Patent ID: 8001109

Claim:
A computer program device including, a computer-readable medium for automatically determining data partitioning for given workload in a parallel database, the medium bearing instructions which when executed by the processor cause the processor to: recommend least one candidate partition for at least one data table; evaluate the candidate partition based in part on a workload of query statements to determine a cost of the workload of query statements by replacing original partitions in the workload of query statements with the candidate partition; determine at least one statistic associated with the database; determine whether the statistic is an index statistic or a table statistic, wherein; if the statistic is a table statistic, calculate a ratio between a number of nodes in the original partition and a number of nodes in the candidate partition, scale a per-node cardinality and number of leaf pages according to the ratio to render a new number of leaf pages, and adjust a number of index levels based on the new number of leaf pages; if the statistic is an index statistic, calculate a ratio between a number of nodes in the original partition and a number of nodes in the candidate partition, scale a per-node row identifiers (RIDs) and a per-node key count to render a new per-node key count and a new number of RIDs, estimate a new number of leaf pages based in the new per-node key count and the new number of RIDs, and adjust a number of index levels based on the new number of leaf pages.