Query Optimization
Turning SQL (or logical queries) into efficient execution plans.
π― Goals
- Read and reason about query plans
- Understand how indexes and statistics affect plans
π Checklist
- Learn what a query planner/optimizer does
- Use
EXPLAIN/EXPLAIN ANALYZEin at least one RDBMS - Understand nested loop, hash, and merge joins conceptually
- Recognize anti-patterns (SELECT *, functions on indexed columns, etc.)
π Related
- [[Indexes]]
- [[Query Planner]]
- [[02 - RDBMS]]