Patent ID: 9697273
Date: 2017-07-04
CPC Classifications: G06F

Claim:
1. A computer program product comprising a non-transitory machine-readable medium storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising: applying an estimation algorithm by the at least one programmable processor, the estimation algorithm accessing a dictionary of at least one data partition of a plurality of data partitions containing data of a column of a database table to generate a uniqueness metric representative of the data in the column; assigning, by the at least one programmable processor, a first estimation factor to a column of a database table when the uniqueness metric is above a threshold value and assigning a second estimation factor to the column when the uniqueness metric is not above the threshold value, the second estimation factor being larger than the first estimation factor; calculating, by the at least one programmable processor, a cost estimate for system resources required to perform a database operation on the database table, the cost estimate comprising an estimated total number of distinct values in the column across all of the plurality of data partitions determined using the assigned first estimation factor or second estimation factor and a number of rows in the table as inputs to an estimation function; and performing, by the at least one programmable processor, the database operation involving at least one of the column and other columns of the database table in an optimal order, the performing comprising applying an operation plan developed using the cost estimate.