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
| Read replica | Shard | |
|---|---|---|
| Scales | Reads | Writes (and storage) |
| Data | Full copy of everything | A slice of the keyspace |
| Consistency | Replication lag on reads | Cross-shard operations lose atomicity |
| Failover | Promote a replica | Per-shard concerns |
| Complexity | Low — add and route reads | High — routing, rebalancing, cross-shard logic |
| Choose this when | A read-heavy workload (most are) — near-linear read capacity and a failover target. | A write-bound workload that has outgrown one machine — replicas cannot help writes. |