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.

PartitioningSharding
Splits acrossPieces of one database (one machine)Separate database nodes (many machines)
Adds capacityNo — operability onlyYes — the only way past one machine’s write ceiling
Joins & transactionsIntactCross-shard ones move to the application or vanish
RetentionDROP a partition — instantPer-shard, coordinated
EffortA schema changeA re-architecture
Choose this whenA single huge table (events, logs) that is hard to index, vacuum and prune — partition by time.A measured single-machine write ceiling, after vertical scaling, replicas, caching and partitioning are exhausted.