pub struct Optimizer { /* private fields */ }Expand description
Query optimizer that transforms logical plans for better performance.
Implementations§
Source§impl Optimizer
impl Optimizer
Sourcepub fn with_filter_pushdown(self, enabled: bool) -> Self
pub fn with_filter_pushdown(self, enabled: bool) -> Self
Enables or disables filter pushdown.
Sourcepub fn with_join_reorder(self, enabled: bool) -> Self
pub fn with_join_reorder(self, enabled: bool) -> Self
Enables or disables join reordering.
Sourcepub fn with_cost_model(self, cost_model: CostModel) -> Self
pub fn with_cost_model(self, cost_model: CostModel) -> Self
Sets the cost model.
Sourcepub fn with_cardinality_estimator(self, estimator: CardinalityEstimator) -> Self
pub fn with_cardinality_estimator(self, estimator: CardinalityEstimator) -> Self
Sets the cardinality estimator.
Sourcepub fn cost_model(&self) -> &CostModel
pub fn cost_model(&self) -> &CostModel
Returns a reference to the cost model.
Sourcepub fn cardinality_estimator(&self) -> &CardinalityEstimator
pub fn cardinality_estimator(&self) -> &CardinalityEstimator
Returns a reference to the cardinality estimator.
Sourcepub fn estimate_cost(&self, plan: &LogicalPlan) -> Cost
pub fn estimate_cost(&self, plan: &LogicalPlan) -> Cost
Estimates the cost of a plan.
Sourcepub fn estimate_cardinality(&self, plan: &LogicalPlan) -> f64
pub fn estimate_cardinality(&self, plan: &LogicalPlan) -> f64
Estimates the cardinality of a plan.
Sourcepub fn optimize(&self, plan: LogicalPlan) -> Result<LogicalPlan>
pub fn optimize(&self, plan: LogicalPlan) -> Result<LogicalPlan>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Optimizer
impl RefUnwindSafe for Optimizer
impl Send for Optimizer
impl Sync for Optimizer
impl Unpin for Optimizer
impl UnwindSafe for Optimizer
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