Compare
Side-by-side on the decisions that recur: index vs scan, normalize vs denormalize, optimistic vs pessimistic, partition vs shard, and more — with when to choose each.
Index Scan vs Sequential ScanNormalize vs DenormalizeOptimistic locking vs Pessimistic lockingRead Committed vs SerializablePartitioning vs ShardingRead replica vs ShardRelational vs DocumentPostgres + pgvector vs Dedicated vector DBCache-aside vs Write-throughB+ tree storage engine vs LSM tree storage engineHeap table + secondary indexes (PostgreSQL-style) vs Clustered primary index (InnoDB-style)LRU vs Clock (second chance)Synchronous replication vs Asynchronous replication
Index Scan vs Sequential Scan
Descend a B-tree, fetch matching rows by pointer…
Normalize vs Denormalize
Write correctness — each fact stored once…
Optimistic locking vs Pessimistic locking
Version column; write with WHERE version = ?; retry on 0 row…
Read Committed vs Serializable
Fresh per statement…
Partitioning vs Sharding
Pieces of one database (one machine)…
Read replica vs Shard
Reads…
Relational vs Document
Rows across normalised tables…
Postgres + pgvector vs Dedicated vector DB
One…
Cache-aside vs Write-through
The app, on read miss; deletes on write…
B+ tree storage engine vs LSM tree storage engine
height + 1 page reads; one structure…
Heap table + secondary indexes (PostgreSQL-style) vs Clustered primary index (InnoDB-style)
unordered heap pages; every index points at a TID (page, slo…
LRU vs Clock (second chance)
doubly linked list + hash map; move to head on every hit…
Synchronous replication vs Asynchronous replication
the replica has durably received (or applied) the WAL…