Expand description
Rule-based SQL query optimizer for LogicalPlan.
The optimizer applies a configurable sequence of rewrite passes to a
LogicalPlan tree. Each pass implements OptPass and is applied in
order. The default pipeline (built by Optimizer::new) includes:
PredicatePushdown— push filters toward leaf scansProjectionPruning— trim projections to the required column setConstantFolding— evaluate literal expressions at compile timeLimitPushThrough— pushLIMIT Ninto single-table scansJoinAlgorithmPass— annotateJoinnodes with an algorithm hint
Re-exports§
pub use cse::CommonSubexprElimination;pub use join_algo::JoinAlgoHint;pub use join_algo::JoinAlgorithmPass;pub use simplify::PredicateSimplification;
Modules§
- cse
- Common-subexpression-elimination pass.
- expr_
util - Shared expression utilities for optimizer passes.
- join_
algo - Pass 5: Join algorithm selection.
- join_
reorder - Cost-based join reordering pass (Item 1).
- simplify
- Predicate-simplification pass.
Structs§
- Constant
Folding - Evaluate constant expressions in
Filterpredicates at compile time. - Limit
Push Through - Push a
Limitnode down into a single-tableScan. - Optimizer
- Multi-pass rule-based optimizer.
- Predicate
Pushdown - Push
Filternodes toward leafScannodes. - Projection
Pruning - Prune
Projectcolumn lists to only those columns required by the parent.
Traits§
- OptPass
- A single optimizer rewrite rule.
Functions§
- optimize
- Run all five default optimizer passes over
plan.