Partitioning splits data within a database; sharding distributes it across instances
coreintermediatePartitioning divides one table's rows into smaller physical pieces that still live on the same database server — it helps manageability and query performance but does not add capacity beyond one machine. Sharding goes further: it splits data across multiple separate database instances (often on separate machines), which is what actually lets storage and write throughput scale past what a single instance can hold.
Think of it as
Partitioning is organizing one huge filing cabinet's drawers by year, so finding "2024 records" doesn't mean searching every drawer — but it's still one cabinet, in one room, with one capacity. Sharding is buying five separate filing cabinets and putting them in five different rooms, each holding a different slice of the records — now the total capacity is five cabinets' worth, but finding something means first knowing which room to walk into.
What we're doing: Show a table that outgrows partitioning alone and needs sharding to keep scaling.
- 8
- This is the ceiling partitioning cannot break through — it never added a second machine's worth of capacity.
- 11
- Sharding is what actually adds capacity here — 8 instances, each independently handling its own slice.
Why this works: A very common mistake is reaching for "more partitions" to solve a capacity problem that only sharding can actually fix — the two solve genuinely different problems and are not interchangeable.
Adding more partitions to solve a single-instance capacity problem
Wrong
Better
What you see: A team repartitions an already-partitioned table to try to fix disk space or write-throughput pressure, sees no real improvement, and is confused why — because partitioning never touches the underlying single-machine ceiling that sharding exists to break.
Why: Partitioning reorganizes data for manageability and query performance within a fixed amount of hardware; it cannot exceed that hardware's limits no matter how the rows are split, because every partition still lives on the same disk and competes for the same CPU.
- Partitioning
- One database instance, split into pieces
- Helps manageability and query speed
- Never adds capacity beyond one machine
- Sharding
- Multiple independent database instances
- Each shard handles its own reads and writes
- Actually adds capacity by adding machines
Partitioning vs sharding
Remember: Partitioning reorganizes data within one instance for manageability and query speed; sharding distributes data across multiple instances to actually add capacity beyond what one machine can hold.
See also: choosing shard keys · sharding operational complexity

