REBALANCE
For index-controlled and table-controlled partitioned table spaces, you can use the REBALANCE command option to rebalance partitions.
This option does not apply to index-only or nonpartitioned table space reorganizations.
In a single execution of REORG PLUS, you can rebalance up to 255 ranges of logically contiguous partitions.
REBALANCE tells REORG PLUS to define new partition boundaries and evenly redistribute rows across the reorganized partitions. When you specify a list of partitions, REORG PLUS rebalances all logically contiguous partitions. REORG PLUS computes limit key breaks based on rebalancing at the record level, which enables REORG PLUS to redistribute the number of rows across partitions.
You can also use REBALANCE with all SHRLEVEL options, including SHRLEVEL CHANGE. However, you must have sufficient unique limit key values to allow REORG PLUS to establish new balanced limit keys. If the number of duplicate keys results in an empty partition, the reorganization fails because REORG PLUS cannot determine the correct limit key.
Restrictions
The following restrictions apply when you use the REBALANCE option. For more information, including requirements and considerations, see Partition-rebalancing.
- When invoking DSNUTILB, REORG PLUS handles this option as follows:
- For partition-by-growth and nonpartitioned table spaces, REORG PLUS ignores this option.
- For all other objects, REORG PLUS passes this option to the IBM Db2 REORG utility for processing.
- You cannot rebalance the partitions of the following table space types:
- Partition-by-growth table spaces
- Table spaces for clone objects or base objects that participate (or have participated) in a clone relationship
- XML table spaces
- LOB table spaces
- Table spaces that contain a LOB column, when reorganizing natively
Table spaces that contain an XML column
- When you restart a reorganization, you cannot change the REBALANCE specification.
REORG PLUS invokes DSNUTILB when all of the following conditions exist:
- You are reorganizing a table space that contains a LOB column.
- You specify SHRLEVEL REFERENCE.
- You do not specify the AUX option on the REORG command.
In this case, the Db2 REORG utility defaults to AUX YES.
- You cannot specify the following combination of options when all partitioning columns are ascending and any column except the last column is nullable:
- SHRLEVEL NONE
- UNLOAD RELOAD (single-phase processing)
- REBALANCE
Specifying partitions
Use care when specifying partitions. REORG PLUS rebalances partitions by logical partition number, rather than physical partition number. If contiguous physical partitions are not contiguous by logical partition number, REORG PLUS cannot rebalance them. For more information, see Specifying partitions.
ON n COLUMNS
ON n COLUMNS tells REORG PLUS how many columns to use for the limit key. Specify any value from 1 through the number of columns in the limit key definition.
When invoking DSNUTILB, REORG PLUS changes REBALANCE ON n COLUMNS to REBALANCE.
Related topic