Suggest an editImprove this articleRefine the answer for “How does partitioning differ from sharding?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**Partitioning** and **sharding** share the same idea - in both cases large data gets split into parts, but the key difference is **where and why those parts are stored**: partitioning keeps every partition **on a single server** (within one database), while sharding stores each shard **on a separate server** or cluster. **Key point:** partitioning is handled by the DBMS itself for performance and manageability within a single system, while sharding requires external logic (request routing, synchronization, replication) for horizontal scaling of the entire system - in short: partitioning splits a table *within one server*, sharding splits a database *across different servers*.Shown above the full answer for quick recall.Answer (EN)Image**Partitioning** and **sharding** share the same idea, in both cases large data gets split into parts. But the key difference is **where and why those parts are stored**. ### Partitioning - **Where:** every partition lives **on a single server** (within one database). - **Goal:** improve performance and manageability *within* a single system. - **Management:** handled by the DBMS itself (e.g. PostgreSQL can partition tables natively). - **Typical scenarios:** faster queries, cleaning up old data, optimizing storage for large tables. Example: an orders table split by month, January, February, March, all stored on one server. ### Sharding - **Where:** each shard lives **on a separate server** or cluster. - **Goal:** horizontal scaling of the whole system and load distribution. - **Management:** requires external logic, request routing, synchronization, replication. - **Typical scenarios:** large web services, millions of users, terabytes of data. Example: users with IDs 1-1,000,000 on one server, the rest on another. **In short:** - Partitioning = splitting a table *within one server*. - Sharding = splitting a database *across different servers*.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.