Self-adjusting database-query optimizer
First Claim
Patent Images
1. A computer-implemented method for use in executing a query in a database system, the method comprising:
- initiating execution of the query according to an initial query-execution plan that identifies an expected path for execution of the query; and
at some point after execution of the query has begun;
concluding that execution of the query has not proceeded along the expected path; and
in response, choosing an alternative query-execution plan for continued execution of the query.
2 Assignments
0 Petitions
Accused Products
Abstract
A database-management system (DBMS) initiates execution of an incoming database query according to an initial query-execution plan that identifies an expected path for execution. Then, at some point after execution of the query has begun, the DBMS concludes that execution has not proceeded along the expected path and, in response, chooses an alternative query-execution plan for continued execution of the query.
-
Citations
27 Claims
-
1. A computer-implemented method for use in executing a query in a database system, the method comprising:
-
initiating execution of the query according to an initial query-execution plan that identifies an expected path for execution of the query; and
at some point after execution of the query has begun;
concluding that execution of the query has not proceeded along the expected path; and
in response, choosing an alternative query-execution plan for continued execution of the query. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A computer-implemented method for use in executing a query in a database system, the method comprising:
-
initiating execution of the query according to an initial query-execution plan; and
at some point after execution of the query has begun;
concluding that an actual result obtained at a first intermediate checkpoint in the initial query-execution plan matches an expected result for the first intermediate checkpoint;
concluding that an actual result for a second intermediate checkpoint in the initial query-execution plan does not match an expected result for the second intermediate checkpoint; and
in response, choosing an alternative query-execution plan for continued execution of the query. - View Dependent Claims (13, 14, 15)
-
-
16. A computer program, stored on a tangible storage medium, for use in executing a query in a database system, the program comprising computer-readable instructions that, when executed by a computer, cause the computer to:
-
initiate execution of the query according to an initial query-execution plan that identifies an expected path for execution of the query; and
at some point after execution of the query has begun;
conclude that execution of the query has not proceeded along the expected path; and
in response, choose an alternative query-execution plan for continued execution of the query. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26)
-
-
27. A signal propagated over a physical medium, the signal carrying computer-readable instructions that, when executed by a computer, cause the computer to:
-
receive an initial plan for execution of the query that includes an initial cost estimate indicating how one or more database resources are expected to be used in carrying out the initial plan;
start execution of the initial plan; and
at an intermediate checkpoint after execution of the initial plan has started;
receive information about an actual result obtained during execution of the initial plan;
use the actual result to calculate a revised cost estimate indicating how the one or more database resources are expected to be used in carrying out the initial plan from the intermediate checkpoint;
compare the revised cost estimate to the initial cost estimate;
conclude that the revised cost estimate lies beyond a predetermined margin-of-error around the initial cost estimate; and
start execution of an alternative plan for execution of the query.
-
Specification