Patent ID: 8078610

Claim:
A method for dynamically determining at query execution time the data values from a set of relational join column(s) that will exceed a skew threshold and performing skew avoidance, the method comprising the steps of: creating a skewed value temporary table, the table associating data values for common join columns between the first and second relation with partitioning factors representing distinct numbers, the partitioning factors used to replicate a proper subset of the second relation rows during the subsequent join operation; populating the temporary table with one or more join column values from the first relation that have a row frequency greater than the skew threshold and the value-specific partitioning factor; determining whether a row from the first relation matches a row from the temporary skewed values table on the join column(s); when a row from the first relation matches a row from the temporary skewed values table, hash-redistributing the row from the first relation across the data storage facility on a composite key comprising the aforementioned common join column(s) plus a calculated value that represents the unique set of data values contained within the row modulo the associated partition factor; and when a row from the first relation does not match any row from the temporary skewed values table, hash-redistributing the row from the first relation across the data storage facilities on the common join column(s) plus an explicit or implied constant default value.