Patent ID: 7962442

Claim:
A computer-implemented method of managing execution of a query against a partitioned database having a plurality of data partitions, each data partition containing different data relative to the other data partitions, each data partition having a different workload, the method comprising: receiving a query having conditional filtering logic to restrict data records in the partitioned database to a result set satisfying the conditional filtering logic; based on an indication that only a subset of the result set is to be returned, determining a subset of data partitions from the plurality of data partitions from which the subset of the result set is retrievable, wherein the subset is determined with reference to a numerical limit on results to be returned and without regard for any particular fields in the result set, wherein the indication is historical data indicative of an amount of data records returned from specified ones of the plurality of data partitions for previous executions of the query, and wherein determining the subset of data partitions from which to retrieve the subset of the result set comprises: identifying the specified ones of the plurality of data partitions in the historical data as the subset of data partitions; executing the query only against the subset of data partitions; and returning the subset of the result set.