STATIC DATA CACHING FOR QUERIES WITH A CLAUSE THAT REQUIRES MULTIPLE ITERATIONS TO EXECUTE
First Claim
1. A method comprising:
- receiving a query with a clause that requires multiple iterations to execute;
prior to executing the query, determining, based on the query, one or more database operations that are;
performed in more than one iteration, andat least partially performed against a static set of rows, said static set of rows being static during execution of the query;
while executing the query,loading said static set of rows into a database buffer cache; and
performing at least one iteration other than a first iteration against the buffered static set of rows.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are described herein to generate and to execute a query execution plan using static data buffering. After receiving a query with a clause that requires multiple iterations to execute, a database management system (DBMS) generates a plurality of plans that vary the order in which the database operations are executed. Within each plan, the DBMS identifies sets of rows within that plan that contain static data during execution of the query. Then, an additional step is added to each plan that includes loading the static set of rows in a database buffer cache. One or more database operations, from an iteration other than the first iteration, may be performed against the cached static set of rows. For each plan generated in this manner, a cost analysis model is applied, and the plan with the lowest estimated computational cost is selected for use as the query execution plan.
-
Citations
21 Claims
-
1. A method comprising:
-
receiving a query with a clause that requires multiple iterations to execute; prior to executing the query, determining, based on the query, one or more database operations that are; performed in more than one iteration, and at least partially performed against a static set of rows, said static set of rows being static during execution of the query; while executing the query, loading said static set of rows into a database buffer cache; and performing at least one iteration other than a first iteration against the buffered static set of rows. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. One or more non-transitory computer-readable media storing one or more sequences of instructions which, when executed by one or more processors, cause:
-
receiving a query with a clause that requires multiple iterations to execute; prior to executing the query, determining, based on the query, one or more database operations that are; performed in more than one iteration, and at least partially performed against a static set of rows, said static set of rows being static during execution of the query; while executing the query, loading said static set of rows into a database buffer cache; and performing at least one iteration other than a first iteration against the buffered static set of rows. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
-
16. A database management system comprising one or more computing devices configured to:
-
receive a query with a clause that requires multiple iterations to execute; prior to executing the query, determine, based on the query, one or more database operations that are; performed in more than one iteration, and at least partially performed against a static set of rows, said static set of rows being static during execution of the query; while executing the query, load said static set of rows into a database buffer cache; and perform at least one iteration other than a first iteration against the buffered static set of rows. - View Dependent Claims (17, 18, 19, 20)
-
-
21. A method comprising:
-
receiving a query that requires an iterative execution of at least one sub-query within the query; prior to executing the query, identifying, based on the query, one or more static data inputs required for the iterative execution; testing different permutations of a query execution plan by estimating a cost savings accrued due to grouping and buffering one or more of the static data inputs; and selecting, for query execution, the query execution plan that maximizes the cost savings.
-
Specification