Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sharding is a specific type of partitioning, it’s not a synonym.


Do you have some hints or keywords I can Google to learn what the differences are?

I'd always assumed they were the same thing, and the choice just gave you a hint of the speakers background. Old school DBAs are way more likely o say "partitioning", game devs or young FE devs will almost always use "sharding".


So some people will refer to "vertical partitioning" (ie splitting up by table or column) and "horizontal partitioning" (ie splitting up a table by rows, via some shard scheme or key).

With this, sharding and horizontal partitioning are essentially the same, and the term partitioning by itself just means splitting up the data in some way (could be horizontal, vertical, or other).

That said, I've also heard people use shard and partition interchangeably in the general form, in which case, you get "horizontal sharding" and "vertical sharding".

I'd start by googling horizontal vs vertical partitioning.


> sharding and horizontal partitioning are essentially the same

That's not correct: https://en.wikipedia.org/wiki/Shard_(database_architecture)#... al_partitioning

For example, horizontal partitioning is often used within the same schema on the same instance in order to have separate indexes for (say) current vs. historical data. That's not what is meant by sharding, however; shards are separate instances.


I think people just use the terms slightly differently. Even the Wikipedia article you linked contradicts itself.

> Sharding goes beyond this. It partitions the problematic table(s) in the same way, but it does this across potentially multiple instances of the schema.

"Beyond this" but still "potentially across multiple instances". Anyway, with your framing sharding kind of becomes "distributed horizontal partitioning".


I generally think of partitioning being on a single host, and sharding being the same but across multiple machines


Thanks!


The keywords are "sharding" and "partitioning". (seriously)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: