pub struct CostModel {
pub graph_stats: Option<GraphStats>,
pub column_stats: BTreeMap<String, ColumnStats>,
pub physical_cost: CostEstimator,
}Expand description
Algebraic operator-tree cost model. Produces a unitless cost for
each OperatorTree node so the query optimiser’s
reorder_intersect pass can pick the lowest estimated join order.
Fields§
§graph_stats: Option<GraphStats>§column_stats: BTreeMap<String, ColumnStats>§physical_cost: CostEstimatorImplementations§
Source§impl CostModel
impl CostModel
pub fn new() -> Self
pub fn with_graph_stats(self, stats: GraphStats) -> Self
pub fn with_column_stats(self, stats: BTreeMap<String, ColumnStats>) -> Self
pub fn with_cost_estimator(self, estimator: CostEstimator) -> Self
Sourcepub fn estimate(&self, op: &OperatorTree, stats: &IndexStats) -> f64
pub fn estimate(&self, op: &OperatorTree, stats: &IndexStats) -> f64
Estimate the cost of a subplan against stats.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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