System, method, and computer program product for progressive query processing
First Claim
1. A computer-implemented method for accelerating database query processing, comprising:
- determining during execution of a particular query whether continued execution of a particular query execution plan is worthwhile by calculating the amount of query execution remaining;
computing the difference between estimated optimization parameter values and actual optimization parameter values to determine the significance of parameter estimation errors;
concluding that continued execution is not worthwhile if a significant amount of query execution remains and significant parameter estimation errors have occurred; and
if continued execution is not worthwhile, then suspending query execution, re-optimizing the query, and restarting query execution with a re-optimized query plan.
3 Assignments
0 Petitions
Accused Products
Abstract
A method, system, and computer program product to make query processing more robust in the face of optimization errors. The invention validates the statistics and assumptions used for compiling a query as the query is executed and, when necessary, progressively re-optimizes the query in mid-execution based on the knowledge learned during its partial execution. The invention selectively places a number of CHECK operators in a query execution plan to validate the optimizer'"'"'s cardinality estimates against actual cardinalities. Errors beyond a threshold trigger re-optimization, and the optimizer decides whether the old plan is still optimal and whether to re-use previously computed results. The invention addresses arbitrary SQL queries whose plans can contain sub-queries, updates, trigger checking, and view maintenance operations. The invention can handle concurrent update transactions or updates of common sub-expressions in a query execution plan without compromising consistency and isolation as locking information is tied to the record ID.
194 Citations
18 Claims
-
1. A computer-implemented method for accelerating database query processing, comprising:
-
determining during execution of a particular query whether continued execution of a particular query execution plan is worthwhile by calculating the amount of query execution remaining;
computing the difference between estimated optimization parameter values and actual optimization parameter values to determine the significance of parameter estimation errors;
concluding that continued execution is not worthwhile if a significant amount of query execution remains and significant parameter estimation errors have occurred; and
if continued execution is not worthwhile, then suspending query execution, re-optimizing the query, and restarting query execution with a re-optimized query plan. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A computer-implemented system for accelerating database query processing, comprising:
-
means for determining during execution of a particular query whether continued execution of a particular query execution plan is worthwhile by calculating the amount of query execution remaining;
computing the difference between estimated optimization parameter values and actual optimization parameter values; and
concluding that continued execution is not worthwhile if a significant amount of query execution remains and significant parameter estimation errors have occurred; and
means for, if continued execution is not worthwhile, then performing the steps of suspending query execution, re-optimizing the query, and restarting query execution with a re-optimized query plan.
-
-
18. A computer program product tangibly embodying a program of computer-executable instructions to perform a method for accelerating database query processing, the method comprising:
-
determining during execution of a particular query whether continued execution of a particular query execution plan is worthwhile by calculating the amount of query execution remaining;
computing the difference between estimated optimization parameter values and actual optimization parameter values; and
concluding that continued execution is not worthwhile if a significant amount of query execution remains and significant parameter estimation errors have occurred; and
if continued execution is not worthwhile, then suspending query execution, re-optimizing the query, and restarting query execution with a re-optimized query plan.
-
Specification