Patent ID: 7979421

Claim:
A computer-implemented method comprising: generating an estimate of a number of results of a query of a data repository in accordance with estimation functions comprising: a function to estimate a result of an operator NOT comprising a difference between a total number of possible results and an estimate of a number of results for a first operand of the operator NOT, a function to estimate a result of an operator AND comprising a division of a product of a second operand and a third operand by the total number of possible results, and a function to estimate a result of an operator OR comprising a sum of an estimation of a fourth operand and a fifth operand minus a quotient, the quotient comprising a product of the fourth operand and the fifth operand divided by the total number of possible results; defining a subset of data in the data repository; determining whether to execute the query on the subset of the data, the query to be executed on the subset of the data if the estimate of the number of results of the query indicates that executing the query on the subset of the data is estimated to return a number of results greater than a threshold; causing the query to be executed on the subset of the data to generate a partial set of results if the estimate of the number of results of the query indicates that executing the query on the subset of the data is estimated to return a number of results greater than a threshold; otherwise, causing the query to be executed on the data repository to generate a complete set of results; and providing the partial set of results of the execution of the query or the complete set of results of the execution of the query.