Patent ID: 7953727

Claim:
A method for handling requests for data stored in database tables, the method comprising: receiving a request for data stored in a database table, the database table including non-hash and hash columns, a hash column including hash values computed based on non-hash values in at least one non-hash column; generating a plurality of database queries that are executable to retrieve data stored in the database table satisfying the request, each database query using a different combination of columns in the database table, wherein each database query has already been optimized by a database management system through selection of an execution plan; ranking database queries based on desirability, a database query using a higher number of hash columns being more desirable than a database query using a lower number of hash columns; analyzing the database queries to determine whether any of the database queries only uses indexed columns of the database table; and responsive to one or more of the database queries only using indexed columns of the database table, selecting a highest ranked of the one or more database queries for execution.