Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the benefits of vertical partitioning VS horizontal partitioning?

I simply cannot understand when or in what situation will we ever choose vertical partitioning instead of horizontal partitioning.

What are the benefits of vertical partitioning VS horizontal partitioning?

Are there any examples of websites / companies / anyone that uses vertical partitioning and what is/will be the main reason for that decision?

like image 644
totsum Avatar asked Jul 12 '11 17:07

totsum


People also ask

What are the advantages of horizontal partitioning?

The three partitions are done in simple horizontal partitions i.e., input, data transformation (processing) and output. Software, that can easily be tested. Software, that can easily be maintained. Propagation of fewer side effects.

What is the difference between horizontal and vertical partitioning?

Vertical Partitioning stores tables &/or columns in a separate database or tables. Horizontal Partitioning (sharding) stores rows of a table in multiple database clusters. Sharding makes it easy to generalize our data and allows for cluster computing (distributed computing) .

How do horizontal and vertical partitioning help with database performance?

Like horizontal partitioning, vertical partitioning lets queries scan less data. This increases query performance. For example, a table that contains seven columns of which only the first four are generally referenced may benefit from splitting the last three columns into a separate table.

What are the advantages of using partitioning?

Partitioning improves the performance of the delete old version shell script since all old version data is in a separate partition. By having all current version data in a separate partition, more current version data is available in database memory that results in efficient use of database buffer pools.


1 Answers

The main reason to have vertical partition is when there are columns in the table that are updated more often than the rest. You separate them in another table / partition, and when you are performing updates, you do not update the rest of the table. Example can be the posts counter. If it is in the same table as the other user data, each update of the counter (and there are lots) will lock the entire record, but you need to read it often. In vertical partitioning, the updated table will be user_counters, and the performance of users won't be affected of the number of updates.

like image 146
Maxim Krizhanovsky Avatar answered Sep 18 '22 15:09

Maxim Krizhanovsky