Jul 22, 2026
OLAP – Phase 9 Query Planner and Optimizer
The parser produces an AST — a syntactic representation of the SQL query. But the AST doesn’t know whether table names exist, what types columns have, or how to execute the query efficiently. This phase bridges the gap with three components: a binder that resolves names and types, an optimizer that rewrites the logical plan for efficiency, and a physical planner that maps logical operators to executable physical operators.
The pipeline is: AST → Binder → Logical Plan → Optimizer → Physical Planner → Physical Plan.