Patent ID: 7281004

Claim:
A computer-implemented method for optimizing compression of a workload comprising a plurality of queries, the computer-implemented method comprising: estimating a cost to execute each query within a plurality of queries of a workload; automatically selecting a sub-set of queries from the workload, the sub-set of queries comprising one or more queries from the workload that together have a total estimated cost of execution less than or equal to a threshold level, the threshold level comprising a percentage of the total estimated cost to execute all the queries of the workload, the percentage comprising between about 40% and about 65%, wherein the queries of the workload are in decreasing rank order based on an estimated cost of execution for each query and selection of the sub-set of queries examines queries in the rank order from the higher estimated cost of execution toward the lower estimated cost of execution; and compressing the selected sub-set of queries.