Professional Documents
Culture Documents
Partitioning - DW
Partitioning - DW
Partitioning Strategy
Need for partitioning
Unlike horizontal partitioning, vertical partitioning divides the dataset based on columns or attributes.
In this technique, each partition contains a subset of columns for each row. Vertical partitioning is
useful when different columns have varying access patterns or when some columns are more frequently
accessed than others.
Advantages:
Improved query performance: By placing frequently accessed columns in a separate partition,
vertical partitioning can enhance query performance by reducing the amount of data read from
storage.
Efficient data retrieval: When a query only requires a subset of columns, vertical partitioning allows
retrieving only the necessary data, saving storage and I/O resources.
Simplified schema management: With vertical partitioning, adding or removing columns becomes
easier, as the changes only affect the respective partitions.
Disadvantages:
Increased complexity: Vertical partitioning can lead to more complex query execution plans, as
queries may need to access multiple partitions to gather all the required data.
Joins across partitions: Joining data from different partitions can be more complex and potentially
slower, as it involves retrieving data from different partitions and combining them.
Limited scalability: Vertical partitioning may not be as effective for datasets that continuously grow
in terms of the number of columns, as adding new columns may require restructuring the
partitions.
Vertical Partition
splits the data vertically. The following images depicts how vertical
partitioning is done.
Vertical partitioning can be performed in the following
two ways −
Normalization
Row Splitting
Normalization
Normalization is the standard relational method of
database organization. In this method, the rows are
collapsed into a single row, hence it reduce space. Take
a look at the following tables that show how
normalization is performed.
Product sales_d Store_i Store_n Locatio
Qty Value Region
_id ate d ame n
3-Aug- Bangal
30 5 3.67 16 sunny S
13 ore
3-Sep- Bangal
35 4 5.33 16 sunny S
13 ore
3-Sep- Mumba
40 5 2.50 64 san W
13 i
3-Sep- Bangal
45 7 5.66 16 sunny S
13 ore
Table after Normalization