pub struct CostModel { /* private fields */ }Expand description
Cost model for query operations.
Implementations§
Source§impl CostModel
impl CostModel
Sourcepub fn register_statistics(&self, table: String, stats: Statistics)
pub fn register_statistics(&self, table: String, stats: Statistics)
Register statistics for a table.
Sourcepub fn get_statistics(&self, table: &str) -> Option<Statistics>
pub fn get_statistics(&self, table: &str) -> Option<Statistics>
Get statistics for a table.
Sourcepub fn filter_cost(&self, input_rows: usize, selectivity: f64) -> Cost
pub fn filter_cost(&self, input_rows: usize, selectivity: f64) -> Cost
Estimate cost of a filter operation.
Sourcepub fn join_cost(
&self,
left_rows: usize,
right_rows: usize,
join_type: JoinType,
) -> Cost
pub fn join_cost( &self, left_rows: usize, right_rows: usize, join_type: JoinType, ) -> Cost
Estimate cost of a join operation.
Sourcepub fn aggregate_cost(&self, input_rows: usize, group_count: usize) -> Cost
pub fn aggregate_cost(&self, input_rows: usize, group_count: usize) -> Cost
Estimate cost of aggregation.
Sourcepub fn estimate_selectivity(&self, table: &str, expr: &Expr) -> f64
pub fn estimate_selectivity(&self, table: &str, expr: &Expr) -> f64
Estimate selectivity of a predicate.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CostModel
impl !RefUnwindSafe for CostModel
impl Send for CostModel
impl Sync for CostModel
impl Unpin for CostModel
impl UnsafeUnpin for CostModel
impl UnwindSafe for CostModel
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more