Record distribution and partition boundaries in HALDB databases

You can adjust the distribution of records in your HALDB database by redefining the range of records that a partition holds.

You redefine the range of records for a partition by changing the boundaries between the partitions. Because the number of records that a partition contains can change over time, you would typically adjust the distribution of records in a HALDB database when one or more partitions in the HALDB database become too large or too small.

How you change partition boundaries depends on how your HALDB database performs partition selection. HALDB databases perform partition selection by using either partition high keys, which are based on the root keys of the records, or a partition selection exit routine, which is based on a user-defined partition selection string.

If your HALDB database selects partitions based on high keys, you change the range of records in a partition by changing its high key.

If your HALDB database selects partitions using a partition selection exit routine, you change the range of records in a partition by modifying the exit routine itself. These modifications are typically installation-specific and therefore are not documented in this topic.

Changes to partition boundaries can affect one or more partitions. If a change to one partition causes records to be moved to or from any other partitions, the change also affects those other partitions. If you use high keys for partition selection, IMS automatically sets the initialization-required flag for the partitions that are affected by a boundary change. If you use a HALDB partition selection exit routine, you must flag the partitions that are affected by a boundary change as requiring initialization. In either case, before you change the partition boundaries, you must issue the /DBR command against all of the partitions that will be affected by the change.

Adding, disabling, and deleting partitions from a HALDB database can also affect the distribution of records.