Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 01 · Database Internals · One Database, to the Bolt · with code: Python · about 15 min to read

Play it as a journeyTutor comes with a plan

Make this Postgres fast: the brief

The Map
The Map · Open board

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.

Lesson 24 of 26 in Database Internals

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • December 1974: forget the small efficiencies, 97 percent of the time
  • The brief
  • The bench
  • The stopwatch
  • Where did the time go?
  • The plans behind the two scans
  • What to leave alone
  • What the scorecard cannot see

Terms it explains: 5 statements, The index counters,, WAL bytes per order, buffer pool, page, vacuum.

Review Database Internals