Skip to main content

What is database sharding?

FAQ resource for your migration project.

FAQ resource for What is database sharding?.

Answer

Sharding is a horizontal partitioning technique that splits a large dataset across multiple database instances, each holding a subset of the rows. A shard key (such as a user ID) determines which shard a record lives on, letting the system spread storage and query load across many servers. It enables scale beyond what a single machine can handle but adds complexity: cross-shard queries, joins, and transactions become harder, and choosing a poor shard key can create hot spots. Sharding is typically a last resort after vertical scaling, read replicas, and caching are exhausted.