Syntax validation, object resolution 2. **Semantic check** — Authorization, data type compatibility 3. **Query rewrite** — Predicate pushdown, subquery transformation, view merge 4. **Access path selection** — This is where the optimizer lives 5. **Code generation** — Build the executable section