Quick Answer
Database sharding splits data horizontally across multiple DB instances. Each shard holds a subset of the data (by user ID range, hash, or geography). Reduces load on any single DB and enables scale beyond one machine. Partitioning is within one DB instance - table data split into partitions for faster queries. Sharding is more complex - cross-shard queries and transactions are hard.
Answer
Sharding splits data across multiple DB nodes to improve performance. Partitioning divides tables logically. Common keys: region, customer ID, business domain. Enables parallel processing and reduces contention.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.