Database sharding vs partitioning

前端 未结 8 1798
滥情空心
滥情空心 2021-01-29 17:46

I have been reading about scalable architectures recently. In that context, two words that keep on showing up with regards to databases are sharding and partitionin

8条回答
  •  鱼传尺愫
    2021-01-29 18:07

    Consider a Table in database with 1 Million rows and 100 columns In Partitioning you can divide the table into 2 or more table having property like:

    1. 0.4 Million rows(table1), 0.6 million rows(table2)

    2. 1 Million rows & 60 columns(table1) and 1 Million rows & 40 columns(table2)

      There could be multiple cases like that

    This is general partitioning

    But Sharding refer to 1st case only where we are dividing the data on the basis of rows. If we are dividing the table into multiple table we need to maintain multiple similar copies of schemas as now we have multiple tables.

提交回复
热议问题