Engineering / advanced
How a query becomes work
Follow relational expressions through statistics, planning, joins, memory limits, and execution to explain measured query behavior.
Your route through engineering
Follow the path or begin with a question. Every lesson is open.
Your place, at your pace. Progress is optional and saved only in this browser when available.
Read / explore / reason
Inside this module
Module 01 advanced
How a query becomes work
Follow relational expressions through statistics, planning, joins, memory limits, and execution to explain measured query behavior.
- 01
Relational algebra and rewrite rules
Prove query transformations under bag, NULL, and outer-join semantics before considering whether they reduce execution work.
24 min - 02
Cardinality estimation and histograms
Estimate surviving and joined rows from distributions while identifying where skew, correlation, NULLs, and sampling defeat simple assumptions.
24 min - 03
Cost-based plan selection
Compare legal physical alternatives using explicit resource models, startup cost, expected rows, and the amount of output the caller needs.
24 min - 04
Nested-loop, hash, and merge joins
Choose a join algorithm from predicate support, input size, ordering, skew, and memory instead of ranking operator names universally.
24 min - 05
Vectorized query execution
Use batches to amortize execution overhead while budgeting live columns, validity masks, selection vectors, and memory traffic.
24 min - 06
Iterator pipelines and materialization
Follow demand through execution operators, identify blocking boundaries, and compare repeated recomputation with retaining reusable results.
24 min - 07
Predicate pushdown and late materialization
Reduce intermediate rows and delay wide-value reconstruction while preserving predicate semantics, identity, multiplicity, and visibility.
24 min - 08
Join-order enumeration
Count a bounded search space, use subproblem reuse, and retain physical properties when exploring legal join trees.
24 min - 09
Spill to disk and memory budgets
Budget simultaneously live operators and explain external work without treating a per-operation setting as a server-wide memory reservation.
24 min - 10
EXPLAIN plans and estimation error
Read estimates, observed rows, loops, buffers, and timing in the correct scope before testing a plan-regression hypothesis.
24 min