How a query becomes work

Follow relational expressions through statistics, planning, joins, memory limits, and execution to explain measured query behavior.

10 published lessons1 module240 min of guided study
  1. 01
    How a query becomes workadvanced · 10 lessons

Follow the path or begin with a question. Every lesson is open.

Your notebook0 of 10 lessons completed

Your place, at your pace. Progress is optional and saved only in this browser when available.

Inside this module

Each lesson includes an interactive lab

How a query becomes work

Follow relational expressions through statistics, planning, joins, memory limits, and execution to explain measured query behavior.

  1. 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
  2. 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
  3. 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
  4. 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
  5. 05

    Vectorized query execution

    Use batches to amortize execution overhead while budgeting live columns, validity masks, selection vectors, and memory traffic.

    24 min
  6. 06

    Iterator pipelines and materialization

    Follow demand through execution operators, identify blocking boundaries, and compare repeated recomputation with retaining reusable results.

    24 min
  7. 07

    Predicate pushdown and late materialization

    Reduce intermediate rows and delay wide-value reconstruction while preserving predicate semantics, identity, multiplicity, and visibility.

    24 min
  8. 08

    Join-order enumeration

    Count a bounded search space, use subproblem reuse, and retain physical properties when exploring legal join trees.

    24 min
  9. 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. 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
All engineering modules