![]() |
Vertical partitioning and horizontal partitioning are two techniques used in database design to optimize the organization and management of large tables. They involve dividing a table into smaller, more manageable pieces to improve query performance and maintenance. Vertical Partitioning vs Horizontal PartitioningVertical PartitioningInvolves dividing a table based on columns. It is useful when you have tables with many columns, and not all columns are frequently accessed together. This can improve query performance by reducing I/O and allowing for more efficient indexing of relevant columns. Horizontal PartitioningInvolves dividing a table based on rows, often using a range or a condition. It is useful when dealing with tables containing a large number of rows, and data can be logically grouped based on certain criteria. This can improve query performance by minimizing the amount of data that needs to be scanned for specific queries and allows for easier data management. Difference between Vertical and Horizontal PartitioningHere’s a comparison of the two partitioning methods:
|
Reffered: https://www.geeksforgeeks.org
System Design |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 13 |