pub struct AdvancedQueryOptimizer { /* private fields */ }Expand description
Advanced query optimizer
Implementations§
Source§impl AdvancedQueryOptimizer
impl AdvancedQueryOptimizer
Sourcepub fn new(
row_count: u64,
column_count: usize,
total_size_estimate: f64,
column_stats: HashMap<String, ColumnStatistics>,
) -> Self
pub fn new( row_count: u64, column_count: usize, total_size_estimate: f64, column_stats: HashMap<String, ColumnStatistics>, ) -> Self
Create new optimizer
Sourcepub fn optimize_query(
&self,
num_columns: usize,
has_predicates: bool,
) -> Option<CandidatePlan>
pub fn optimize_query( &self, num_columns: usize, has_predicates: bool, ) -> Option<CandidatePlan>
Optimize query and return best plan
Sourcepub fn get_top_plans(
&self,
num_columns: usize,
has_predicates: bool,
n: usize,
) -> Vec<CandidatePlan>
pub fn get_top_plans( &self, num_columns: usize, has_predicates: bool, n: usize, ) -> Vec<CandidatePlan>
Get top N plans
Sourcepub fn register_index(&mut self, column: String, index_type: IndexType)
pub fn register_index(&mut self, column: String, index_type: IndexType)
Register index for optimization
Sourcepub fn index_coordinator(&self) -> &MultiIndexCoordinator
pub fn index_coordinator(&self) -> &MultiIndexCoordinator
Get index coordinator
Sourcepub fn get_selectivity(&self, column: &str) -> f64
pub fn get_selectivity(&self, column: &str) -> f64
Get selectivity for column
Trait Implementations§
Source§impl Clone for AdvancedQueryOptimizer
impl Clone for AdvancedQueryOptimizer
Source§fn clone(&self) -> AdvancedQueryOptimizer
fn clone(&self) -> AdvancedQueryOptimizer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AdvancedQueryOptimizer
impl RefUnwindSafe for AdvancedQueryOptimizer
impl Send for AdvancedQueryOptimizer
impl Sync for AdvancedQueryOptimizer
impl Unpin for AdvancedQueryOptimizer
impl UnsafeUnpin for AdvancedQueryOptimizer
impl UnwindSafe for AdvancedQueryOptimizer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more