By default, the Data Redistribution utility assumes that the same number of rows hash to each hash partition, therefore it partitions the hash partitions uniformly across all the database partitions of the nodegroup. If the same number of rows do not hash to each hash partition, you can use a distribution file to specify the current distribution. This file contains a value for each of the 4 096 hash partitions. Each value is used as the weight of the corresponding hash partition. The Data Redistribution utility generates a target partitioning map in which all the database partitions have about the same weight. Thus, the distribution file can be used to achieve uniform data distribution even if the data distribution is skewed.
The AutoLoader utility can be used to create a data distribution file using the ANALYZE option. You can use this file as input to the Data Redistribution utility. For more information, see "Using the AutoLoader Utility".
Alternatively, you can use the PARTITION and NODENUMBER SQL functions to determine the current data distribution across hash partitions or database partitions. (You use the PARTITION function to determine the distribution across hash partitions.) You can use this information to derive both a distribution file and a target partitioning map.
[ DB2 List of Books | Search the DB2 Books ]