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.
- 18.01one INSERT, all the way downparse, plan, heap, index, WAL, commit, checkpoint. every step of one row, traced on a real server.
- 18.02postgres vs InnoDBa heap vs a clustered index, versions vs undo, gap locks vs SSI. same SQL, different machine.
- 18.03sqlite, insideone file, one writer, a b-tree for everything, and why it's on your phone a hundred times over.
- 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.
- 18.05a query tuning casebookten slow queries, their EXPLAINs, and the one change that fixed each.
- 18.06SQL interview questionssecond highest salary, duplicates, running totals, streaks. the classics, and the answer that lands.
- 18.07the schema design interviewa booking system from requirements to constraints, thought out loud.
- 18.08database internals interview questionsb-tree vs LSM, MVCC, isolation, WAL. the system design round, answered properly.
- 18.09build a toy databasepages, a b+tree, a WAL and a REPL in a few hundred lines. the whole book, in your editor.
- 18.10where postgres is goingpostgres 19 previewpostgres 19's REPACK and plan advice, what got pulled, and how to follow along.