#database
10 posts
Posts on database internals — storage layouts, indexing, query planning, and the trade-offs that come up at scale.
-
Postgres Concurrency Internals: Connections, Locks, and MVCC
A practical guide to how Postgres handles many concurrent clients — process-per-connection, pooling, lock manager, MVCC tuples, deadlocks, and pg_locks.
postgresqldatabaseconcurrencyinternalsperformance -
Database Replication: Strategies, Topologies, and What to Use When
A practical guide to PostgreSQL replication — physical vs logical, sync vs async, single-leader / multi-leader / leaderless, and replica-read rules.
postgresqldatabasedistributed-systemsreplicationarchitecture -
Postgres Partitioning: Strategies, Real Advantages, and Pitfalls
A practical guide to PostgreSQL partitioning — RANGE, LIST, HASH, pruning, local indexes, real advantages, and the pitfalls that bite in production.
postgresqldatabaseperformanceinternals -
Sharding Postgres: When One Database Stops Being Enough
Sharding Postgres at scale — shard keys, routing, distributed transactions, online rebalancing, and the 15 complexities every team eventually hits.
postgresqldatabasescalingarchitecturedistributed-systems -
B-Trees and B+ Trees: From Binary Trees to Database Indexes
If you know binary search trees, you are halfway to understanding how databases find your data. B-trees are BSTs that got wide on purpose — here is why.
databasedata-structuresinternals -
PostgreSQL Indexing: Internals, Types, and Trade-offs
A practical guide to PostgreSQL indexes: B-tree, GIN, GiST, BRIN, hash — when to use each, composite key ordering, and CONCURRENTLY pitfalls.
postgresqldatabaseperformanceinternals -
PostgreSQL EXPLAIN: Reading and Understanding Query Plans
How to read PostgreSQL EXPLAIN output: scan types, join algorithms, and the cost model — turn opaque query plans into actionable insights.
postgresqldatabaseperformancesql -
How Databases Actually Store and Find Your Data
A bottom-up look at how databases physically store data — pages, heaps, B-trees, clustered indexes, and row IDs.
databaseinternalsperformance -
ACID, Read Phenomena, and Isolation Levels: What to Use When
A practical guide to database transactions — ACID, five concurrency anomalies, isolation levels, MVCC vs locks, and choosing the right level.
databasesqltransactions -
Database Normalization: 1NF through 5NF Explained
A practical guide to database normalization — 1NF through 5NF, when to denormalize, and the pitfalls teams hit. With concrete data examples.
databasesqlfundamentals