Method and system for a self-healing query access plan
First Claim
1. A method for automatic handling of errors within a database engine, the method comprising the steps of:
- detecting an error while executing a query access plan, wherein the error is an execution error of a type that halts execution of the query access plan, wherein the query access plan is of the type generated by a query optimizer, wherein the query access plan is generated prior to installation of a patch to at least one of the database engine and the query optimizer, wherein the patch comprises a program fix including executable code that modifies at least one of the database engine and the query optimizer, and wherein detecting the error is performed after installation of the patch;
in response to detecting the error, automatically rebuilding the query access plan with the query optimizer to generate a new query access plan, wherein the new query access plan is generated after installation of the patch; and
executing the new query access plan to generate at least a portion of a result set for storage or display.
1 Assignment
0 Petitions
Accused Products
Abstract
A self-healing database engine and optimizer framework support automatically responding to execution errors to allow continued execution of a query plan. Upon encountering an execution error, the database engine automatically initiates a rebuilding of the query plan and executes the rebuilt execution plan. If an error is encountered in the rebuilt query plan then the query implementation methods are analyzed. If a query function is identified for which an alternative implementation method is available, then this alternative implementation method is substituted to create a new query plan. The new query plan is then executed to determine if the error is corrected.
-
Citations
11 Claims
-
1. A method for automatic handling of errors within a database engine, the method comprising the steps of:
-
detecting an error while executing a query access plan, wherein the error is an execution error of a type that halts execution of the query access plan, wherein the query access plan is of the type generated by a query optimizer, wherein the query access plan is generated prior to installation of a patch to at least one of the database engine and the query optimizer, wherein the patch comprises a program fix including executable code that modifies at least one of the database engine and the query optimizer, and wherein detecting the error is performed after installation of the patch; in response to detecting the error, automatically rebuilding the query access plan with the query optimizer to generate a new query access plan, wherein the new query access plan is generated after installation of the patch; and executing the new query access plan to generate at least a portion of a result set for storage or display. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method for automatic handling of errors within a database engine, the method comprising the steps of:
-
halting execution of a query access plan in response to receiving an error while executing a function within the query access plan, wherein the error is an execution error of a type that halts execution of the query access plan and that results in an unexecutable application if unaddressed, and wherein the query access plan is of the type generated by a query optimizer, wherein the query access plan is generated prior to installation of a patch to at least one of the database engine and the query optimizer, wherein the patch comprises a program fix including executable code that modifies at least one of the database engine and the query optimizer, and wherein the error is received after installation of the patch; identifying a first implementation method of the function within the query access plan; automatically and without manual intervention, rebuilding the query access plan with the query optimizer by replacing the first implementation method with a second implementation method of the function so as to generate a new query access plan, wherein the new query access plan is generated after installation of the patch; and automatically and without manual intervention, executing the new query access plan to generate at least a portion of a result set for storage or display. - View Dependent Claims (7, 8, 9)
-
-
10. A method for automatic handling of errors within a database engine, the method comprising the steps of:
-
executing a query access plan comprising a plurality of functions, each function including a first implementation method, and the query access plan of the type generated by a query optimizer; halting execution of the query access plan in response to detecting a first error when executing a first function, wherein the first error is an execution error of a type that halts execution of the query access plan and that results in an unexecutable application if unaddressed, wherein the query access plan is generated prior to installation of a patch to at least one of the database engine and the query optimizer, wherein the patch comprises a program fix including executable code that modifies at least one of the database engine and the query optimizer, and wherein the error is detected after installation of the patch; automatically and without manual intervention, performing a first level of automatic error response by rebuilding the query access plan with the query optimizer to generate a new query access plan, wherein the new query access plan is generated after installation of the patch; executing the new query access plan to generate at least a portion of a result set for storage or display; halting execution of the new query access plan in response to receiving a second error while executing the first function within the new query access plan; and automatically and without manual intervention, performing a second level of automatic error response by rebuilding the new query access plan by replacing the first implementation method with a second implementation method of the function.
-
-
11. A method for automatic handling of errors for a database management system, the method comprising:
-
building a first query access plan for a first query with a query optimizer of the database management system; executing the first query access plan with a database engine of the database management system; building a second query access plan for a second query with the query optimizer; executing the second query access plan with the database engine; after building and executing the first and second query access plans, installing a patch to the database management system, wherein the patch applies to the first and second query plans, and wherein the patch comprises a program fix including executable code that modifies at least one of the query optimizer and the database engine; executing the first query access plan after installing the patch; detecting an error while executing the first query access plan after installing the patch, wherein the error is an execution error of a type that halts execution of the first query access plan; in response to detecting the error, automatically rebuilding the first query access plan with the query optimizer to generate a new query access plan, wherein the new query access plan is generated after installation of the patch; executing the new query access plan to generate at least a portion of a first result set for storage or display; and executing the second query access plan after installing the patch, wherein executing the second query access plan after installing the patch includes executing the second query access plan without rebuilding the second query access plan and generating at least a portion of a result set for storage or display.
-
Specification