Written from the postmortems, not the marketing site. Each chapter ends with a checklist.
B-tree, GIN, BRIN, partial, expression, covering — when each earns its place.
When concurrent writes go wrong, and how to see it.
Why your perfectly-indexed query is suddenly slow.
When you can’t just buy a bigger box.
Each example is a real query, a real EXPLAIN, a real fix, a real measured improvement.
60 pages, hyperlinked ToC, code snippets in monospace. Print-friendly.
Each: the slow query, the EXPLAIN output, the diagnosis, the fix, the measured improvement.
The pg_stat / pg_locks / pg_indexes queries we use first when something is wrong.
Quick-reference: things to verify after deploying changes per chapter topic.
If something isn’t answered here, ask in your intro email — we keep this list short on purpose.
14, 15, and 16. Notes for differences in 17 (beta at time of release). Older versions (12, 13) covered where the behavior differs materially.
Yes — most content is engine-level. We call out the specific places hosted Postgres differs (autovacuum tuning surface, replication topology, parameter group constraints).
Briefly. The book is core Postgres. We mention Timescale where time-series patterns benefit, but a full treatment of the distributed forks isn’t in scope.
SQL primarily. Where we show client code, it’s Python (psycopg) and Go (pgx). Patterns translate to other drivers.
We do bespoke kits, too. Send a paragraph about the problem and we’ll come back inside 48 hours.