Index

Module 01 · Database InternalsOne Database, to the Bolt

The Database That Won’t Answer

Locks, Latches & Transactions
Locks, Latches & Transactions · Open board

The queries waiting on each other, drawn side by side with the engine’s own split-second holds. This lesson is what you do when one of those queues has frozen a real app and nobody yet knows which one.

Before you start. The last seven lessons opened one database a layer at a time: a table is a pile of 8 KB pages (Pages & Heap Files), an index is a sorted tree that finds a row in a few page reads (B-Tree on Disk), an update leaves the old row behind for vacuum to sweep up (MVCC & Vacuum), the planner bets on a plan from a small summary of each table (The Query Planner), and a lock makes one query wait for another’s whole transaction (Locks, Latches & Transactions). This lesson uses all of it at once, to work out which of those parts has gone wrong when a database gets sick.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Related paper

Review Database Internals →

Saved in this browser, and to your account when you sign in.