Episode 5. Planner and optimizer. Day 5 of your 12 day sprint. Scenario: "The plan flipped overnight and the query is slow. Nothing changed." Something changed: the statistics or the data shape. Say: "The planner costs paths from pg_statistic. Stale or coarse statistics produce misestimates, and misestimates pick the wrong join." Say the join line: "Nested loop for selective probes, hash for bulk matches, merge when both sides arrive sorted. The estimate picks, not the preference." Say the discipline line: "I fix estimates with ANALYZE and schema, never with enable underscore hacks in production." Lab: build a stale-stats broken plan on paper or locally, run ANALYZE, re-verify the plan change, and write the misestimate in one sentence. Depth tag: Recognize at the executor C++ layer. Say: "I read plan structure and narrate the costing method. I do not claim executor implementation." Drill: name the three joins and their shapes: nested loop, hash, merge. Say: the estimate picks the join, never my preference. Say the honesty line: my method is ANALYZE plus schema, and my limit is executor code. Done-check: write one misestimate sentence for tonight's broken plan. Repeat the discipline line once more before bed: no enable hacks in production. Teaser: tomorrow, Episode 6, RocksDB. A whole different storage religion: the LSM tree.