The Data Redistribution operation is done on the set of tables in the
specified nodegroup of a database. (The application must be connected
to the database at the catalog database partition before executing the
operation.) The utility uses both the source partitioning map and the
target partitioning map to identify which hash partitions have been assigned
to a new location (that is, a new database partition number). All rows
that correspond to a partition that has a new location are moved from the
database partition specified in the source partitioning map to the database
partition specified in the target partitioning map.
The Data Redistribution utility does the following:
- Obtains a new partitioning map ID for the target partitioning map, and
inserts it into the SYSCAT.PARTITIONMAPS catalog view.
- Updates the REBALANCE_PMAP_ID column in the SYSCAT.NODEGROUPS
catalog view for the nodegroup with the new partitioning map ID.
- Adds any new database partitions to the SYSCAT.NODEGROUPDEF catalog
- Sets the IN_USE column in the SYSCAT.NODEGROUPDEF catalog view
to 'D' for any database partition that is to be dropped.
- Does a COMMIT for the catalog updates.
- Creates database files for all new database partitions.
- Redistributes the data on a table-by-table basis for every table in the
nodegroup. This is described in "How Data Is Redistributed in Tables".
- Deletes database files and deletes entries in the
SYSCAT.NODEGROUPDEF catalog view for database partitions that were
previously marked to be dropped.
- Updates the nodegroup record in the SYSCAT.NODEGROUPS catalog view
to set PMAP_ID to the value of REBALANCE_PMAP_ID and
REBALANCE_PMAP_ID to NULL.
- Deletes the old partitioning map from the SYSCAT.PARTITIONMAPS
- Does a COMMIT for all changes.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]