Changing partitioning schemes for tables with range-based partitions
FL 507 You can change the partitioning scheme for a table that uses range-based (PBR) partitions by first converting the table from PBR to PBG and then stacking a conversion from PBG to PBR with the desired partitioning scheme. A single REORG utility operation can materialize the stacked changes.
Before you begin
The application that issues that ALTER TABLE statement to change the table partitioning scheme from PBR to PBG partitions must run at application compatibility level V13R1M507 or higher.
About this task
The stacked conversions can accomplish the following changes to the range-based partitioning scheme.
- Alter partitioning key columns
-
- Add or insert columns to the partitioning key in any position.
- Drop columns from the partitioning key in any position.
- Reorder columns in the partitioning key.
- Change the descending, ascending, or random attributes of columns in the partitioning key.
- Obtain new range-base partitions
-
- Drop empty or non-empty partitions at any position.
- Add new partitions at any position.
- Alter limit key values of multiple partitions with a PBG to PBR RPN conversion
- With PBG to PBR RPN conversion , the limit key values for all partitions can be specified in a single ALTER statement.
- Remove legacy 40-byte truncated limit key values
- Convert legacy limit key values that were truncated at 40 bytes to non-truncated limit key values.
Procedure
To convert a the partitioning scheme of a table with range-based (PBR) partitions, complete the following steps:
