4 ms·
I hadn't ever heard of the term "sharding", but the team I was on was "partitioning" databases in the early 2000's (effectively sharding at the table level so t
by efitz 6y ago
I hadn't ever heard of the term "sharding", but the team I was on was "partitioning" databases in the early 2000's (effectively sharding at the table level so that we could drop table instead of deleting rows).
- mywittyname 6y agoSo my understanding is that there is are practical differences between a partition and a shard. They both are ways to stored separately, based on the partition key. But a partitioned table has one table, while a shard uses multiple tables which share the same schema. For example, with a partitioned database, you might have a single `transaction` table, partitioned by date, but with a shard database, you'd have multiple `transaction_${date}` tables which needed to be queried from, but they'd share a common schema.
- greenshackle2 6y agoLast time I did partitioning by date in postgres (on postgres 9.?), multiple transaction_${date} tables is exactly what I got. They are exposed as a single 'transaction' table but they were really different physical tables. My understanding is that partitioning is a more general term. Partitioning can be on one or multiple servers. Sharding is a type of partitioning that is always across multiple servers.