skip to content
18, 10 chapters
deep dives and interviews
everything.deep_dives

deep dives and interviews

one row traced end to end, other engines compared, the interview questions, and a toy database you build yourself.

start part 18part 18 of 18, 10 chapters
  1. 18.01one INSERT, all the way downparse, plan, heap, index, WAL, commit, checkpoint. every step of one row, traced on a real server.
  2. 18.02postgres vs InnoDBa heap vs a clustered index, versions vs undo, gap locks vs SSI. same SQL, different machine.
  3. 18.03sqlite, insideone file, one writer, a b-tree for everything, and why it's on your phone a hundred times over.
  4. 18.04column stores and vectorized executionthe same table stored by column and run a batch at a time. duckdb's numbers next to postgres's.
  5. 18.05a query tuning casebookten slow queries, their EXPLAINs, and the one change that fixed each.
  6. 18.06SQL interview questionssecond highest salary, duplicates, running totals, streaks. the classics, and the answer that lands.
  7. 18.07the schema design interviewa booking system from requirements to constraints, thought out loud.
  8. 18.08database internals interview questionsb-tree vs LSM, MVCC, isolation, WAL. the system design round, answered properly.
  9. 18.09build a toy databasepages, a b+tree, a WAL and a REPL in a few hundred lines. the whole book, in your editor.
  10. 18.10where postgres is goingpostgres 19 previewpostgres 19's REPACK and plan advice, what got pulled, and how to follow along.