Patent ID: 7287020

Claim:
A computer-implemented method, comprising: collecting information representative of a plurality of past queries against a database, the information collected from a log of the plurality of past queries executed against the database; examining the collected information to determine a number of times each tuple in a set of at least 3 tuples in the database was accessed, the accessing indicatinq the number of times each tuple in the set of at least 3 tuples passed a selection criteria of the plurality of past queries during execution of the plurality of past queries, wherein the set of at least 3 tuples each have a separate access frequency; determining a weight for each tuple in a set of at least three tuples in a database based on a number of times the access frequency of each tuple; selecting a subset of tuples, the subset including at least two tuples, from the set of tuples based on the determined weights, the selecting performed by applying a selection filter to the set of tuples; executing a query against the subset of tuples to determine an answer to a query made against the database, wherein executing the query against the subset of tuples to determine the answer to the query made against the database comprises: for each tuple in the subset of tuples, determining and storing a probability with which the tuple was selected, wherein the probability represents the number of tuples in the subset of tuples each tuple is similar to; executing the query against the subset of tuples to identify candidate tuples; and determining an answer using information from the candidate tuples in the subset of tuples and inverses of the probabilities of the candidate tuples.