HashRow is Terdata's hashing alhorithm and hashbucket extracts the first 20 bits of this 32 bit value as an integer.
The MOD 10 creates 10 possible values which are mapped to 10 partitions using EACH 1 (plus the NO RANGE). As a result each of the 1856 daily partitions is sub-partitioned by 11 Prd_Type_Cd partitions resulting in 1856*111=20416 partitions.
Try to keep the partitioning as simple as possible, i.e. avoid additional calculations. The optimizer must still be able to do partition elimination based on the WHERE-condition.
Dieter
↧