Partition existing tables using the Data Dictionary tool
- Last Updated: August 11, 2021
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
Before you can partition an existing table, you must ensure the following:
- OpenEdge requires that you use Type II storage areas for table
partitions and their associated indexes and LOBs. If an existing non-partitioned
table and its associated indexes and LOBs are not already in Type II areas, you must
first move them to Type II areas. You can do this by using a combination of a
.stfile that contains Type II areas and the PROUTIL TABLEMOVE utility. - Before you can create a partition policy for an existing table, you
must ensure that you have at least one partition-aligned index. If the table does
not have a partition-aligned index, you must create one using the Data Dictionary
tool. When you define a partition-aligned index using the Data Dictionary tool, the
index type is disabled, and you cannot specify it to be global or local. Just go
ahead and create the index. The index then becomes a local index. Note: If it makes sense for your business data, make the partition-aligned index unique. This improves the performance of the subsequent data migration into table partitions.
The way to create a partition policy for an existing table is the same as that for creating a partition policy for a new partitioned table.
However, when you create a partition policy for an existing table, you do not have to explicitly create partition policy details; OpenEdge does this for you automatically. Basically, OpenEdge does the following:
- Creates an initial composite partition for the table. The initial composite partition contains existing data for the entire table and acts as the source for the data migration that you must perform later.
- Examines existing data and defines one or more partition definitions, depending on the partitioning type. The partition definition boundaries are defined but their actual data still resides in the initial composite partition.
- Names the partition definitions using the convention partition-policy-name-n, where n is an integer starting from 1; for example, if the
partition policy is
Order, then the first partition isOrder-1, the second partition isOrder-2, and so on. - Marks the partition definitions as allocated and composite.
The partition definitions that OpenEdge creates depend upon the type of table partitioning you specify. For example:
|
If you create a partition policy that uses … |
Then OpenEdge creates … |
|---|---|
|
List partitioning |
Multiple partition definitions, each corresponding to a specific column value. |
|
Range partitioning |
One partition definition that contains all records that are less than or equal to the highest upper bound. |
|
List-list subpartitioning |
Multiple partition definitions, each corresponding to a specific combination of two values, one for each of the list columns. |
|
List-range subpartitioning |
Multiple partition definitions, each corresponding to a specific combination of two values, one for each list column value for the entire range column. |