Optimization of queries using retrieval status of resources used thereby
First Claim
Patent Images
1. A method of performing a database query, the method comprising:
- generating an access plan for the database query, the access plan using at least one resource capable of being retrieved into working memory, wherein the resource is selected from the group consisting of a database file, a database table, an index, a temporary result set, a temporary file, and a hash table;
estimating a percentage of the resource that is currently resident in working memory;
estimating a cost for the access plan using the estimated percentage; and
selectively executing the access plan based upon the estimated cost.
3 Assignments
0 Petitions
Accused Products
Abstract
An apparatus, program product and method utilize the retrieval status of a resource to generate an access plan for a database query that uses the resource. The retrieval status, which indicates, for example, what percentage of a given resource is already stored in working memory, and thus need not be separately retrieved during query execution, may be used to generate more accurate input/output cost estimates for access plans, and thus enable a query optimizer to better select an access plan that is optimal under given runtime conditions.
-
Citations
30 Claims
-
1. A method of performing a database query, the method comprising:
-
generating an access plan for the database query, the access plan using at least one resource capable of being retrieved into working memory, wherein the resource is selected from the group consisting of a database file, a database table, an index, a temporary result set, a temporary file, and a hash table;
estimating a percentage of the resource that is currently resident in working memory;
estimating a cost for the access plan using the estimated percentage; and
selectively executing the access plan based upon the estimated cost. - View Dependent Claims (2)
-
-
3. A method of optimizing a database query, the method comprising:
-
determining a retrieval status for a resource used by the database query; and
generating an access plan for the database query using the determined retrieval status for the resource. - View Dependent Claims (4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. An apparatus, comprising:
-
at least one processor;
a memory that includes a working memory; and
program code resident in the memory and configured to be executed by the at least one processor to optimize a database query by determining a retrieval status for a resource used by the database query, and generating an access plan for the database query using the determined retrieval status for the resource. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28)
-
-
29. A program product, comprising:
-
program code configured to optimize a database query by determining a retrieval status for a resource used by the database query, and generating an access plan for the database query using the determined retrieval status for the resource; and
a computer readable signal bearing medium bearing the program code. - View Dependent Claims (30)
-
Specification