Glossary
Sharding
Also: Horizontal partitioning
Data is split across several databases by a key, when a single one no longer carries the volume or the load.
The split follows a criterion such as customer, region or time range. Each shard holds part of the data, and the application has to know where to look.
The price is queries across shard boundaries. What used to be a join becomes several queries with merging in the application.
How you notice it
- A single database can no longer hold the data volume.
- Indexes, archiving and bigger machines are exhausted.
- The data can be split along a clear criterion.
Frequently asked
What comes before sharding?
Four things: missing indexes, archiving old data, read replicas for reporting, and a bigger machine. In practice those four handle most cases. Sharding is the answer when they do not.
