Static data caching for queries with a clause that requires multiple iterations to execute
First Claim
1. A method comprising:
- receiving a query with an iterative clause that requires multiple iterations to execute;
during compilation of the query, determining, based on the query, a database operation that is;
performed in more than one iteration of executing the iterative clause, 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 the database operation in a plurality of iterations, wherein said database operation is performed against the static set of rows loaded into the database buffer cache in an iteration of said plurality of iterations other than a first iteration of said plurality of operations.
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.
154 Citations
20 Claims
-
1. A method comprising:
-
receiving a query with an iterative clause that requires multiple iterations to execute; during compilation of the query, determining, based on the query, a database operation that is; performed in more than one iteration of executing the iterative clause, 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 the database operation in a plurality of iterations, wherein said database operation is performed against the static set of rows loaded into the database buffer cache in an iteration of said plurality of iterations other than a first iteration of said plurality of operations. - 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 an iterative clause that requires multiple iterations to execute; during compilation of the query, determining, based on the query, a database operation that is; performed in more than one iteration of executing the iterative clause, 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 the database operation in a plurality of iterations, wherein said database operation is performed against the static set of rows loaded into the database buffer cache in an iteration of said plurality of iterations other than a first iteration of said plurality of operations. - 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 an iterative clause that requires multiple iterations to execute; during compilation of the query, determine, based on the query, a database operation that is; performed in more than one iteration of executing the iterative clause, 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 the database operation in a plurality of iterations, wherein said database operation is performed against the static set of rows loaded into the database buffer cache in an iteration of said plurality of iterations other than a first iteration of said plurality of operations. - View Dependent Claims (17, 18, 19, 20)
-
Specification