Horizontal partitioning consists in segmenting a table into multiple
tables each containing a subset of rows and the same columns in order to optimize data
retrieval. You can use any column, including primary keys, as partitioning
criteria.
Procedure
- Select , or right-click a table in the diagram and select to open the Horizontal Partitioning Wizard.
- Select the table to partition, specify whether you want to keep
the original table after partitioning, and then click
Next.
- Create as many partition tables as necessary using the
Insert and Add a Row tools
(specifying an appropriate name for each, which must be unique in the model),
and then click Next.
- Click the Add Columns tool to select one
or more discriminant columns to use as partition criteria (these columns will be
excluded from the partitions), and then click Next.
- Specify a name and code for the transformation object that will
be created to preserve information about the partitioning, and then click
Finish to create a table for each partition, taking
the name of the partition. All references to the original table are created on
each partition table.
In this example, the table Annual
Sales, which contains a very large amount of data is
horizontally partitioned on the Year
column:
Before |
After |
|
|
Note Horizontal partitionings created in a PDM generated from
another model are preserved when applying changes from the original model.
The absence of discriminant columns in the target PDM is respected in the
Merge dialog (see Core Features Guide > Modeling with PowerDesigner > Comparing and Merging Models), and changes in the source model are selected, by
default, to be cascaded as appropriate to all partition tables.