Make this Postgres fast: the brief

The whole database in one picture, from the page to the lock. A tuning job is a walk through that map with a stopwatch: this lesson finds where the time goes, and Make this Postgres fast: the fixes and the write-up changes it.
Before you start. This is the capstone of the track, and it uses the lessons before it: reading a plan (The Query Planner, The plan, running), choosing an index (Which shortcut to build), diagnosing from a symptom (The Database That Won't Answer) and writing the SQL (The sentence that says what). You need the Docker bench from Pages & Heap Files, or any Postgres 16, and Python 3. The code is in teaching/code/database-internals/tuning.