QUERY EXECUTION PLAN EFFICIENCY IN A DATABASE MANAGEMENT SYSTEM
First Claim
1. a method for improving query execution plan efficiency in a database:
- management system, the method comprising;
receiving a qualified database query, the database query comprising one of a static database query and a dynamic database query;
retrieving a stored query execution plan (QEP) for the database query in response to a QEP repository associating the database query with an active QEP;
generating a new QEP for the database query in response the QEP repository failing to associate the database query with an active QEP, and storing the new QEP in the QEP repository, designating the new QEP as the active QEP, binding the active QEP to the database query; and
satisfying the database query by implementing the active QEP.
3 Assignments
0 Petitions
Accused Products
Abstract
An apparatus, system, and method are disclosed for improving query execution plan efficiency in a database management system. The present invention binds both static database queries and dynamic database queries to new query execution plans (QEPs) that produce the same result set as a former QEP bound to the database queries. Next, the present invention identifies one of the former QEPs and the new QEP as an active QEP and automatically collects execution statistics for one of the former QEPs and the new QEP. Finally, the present invention automatically selects one of the former QEPs and the new QEP as the active QEP in response to completion of the automatic collection of execution statistics, the active QEP selected such that the automatically selected QEP provides optimal execution performance based on performance criteria in comparison to the automatically unselected QEP, the active QEP selected based on the execution statistics.
69 Citations
20 Claims
-
1. a method for improving query execution plan efficiency in a database:
- management system, the method comprising;
receiving a qualified database query, the database query comprising one of a static database query and a dynamic database query; retrieving a stored query execution plan (QEP) for the database query in response to a QEP repository associating the database query with an active QEP; generating a new QEP for the database query in response the QEP repository failing to associate the database query with an active QEP, and storing the new QEP in the QEP repository, designating the new QEP as the active QEP, binding the active QEP to the database query; and satisfying the database query by implementing the active QEP. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
- management system, the method comprising;
-
12. A system to improve query execution plan efficiency in a database management system, the system comprising:
-
a processor; a data storage device for storing data, in communication with the processor; a memory in communication with the processor, the memory comprising, a receiver module configured to receive a qualified database query, the database query comprising one of a static database query and a dynamic database query; a retriever module configured to retrieve a stored query execution plan (QEP) for the database query in response a QEP repository associating the database query with an active QEP; a generation module configured to generate a new QEP for the database query in response the QEP repository failing to associate the database query with an active QEP, and storing the new QEP in the QEP repository, and designating the new QEP as the active QEP; an execution module configured to bind the active QEP to the database query; and a selector module configured to select one of one or more inactive QEPs stored in the QEP repository as the active QEP in response to a user input, the inactive QEPs each formerly bound to the database query.
-
-
13. The system of claim 13, further comprising a statistics module configured to:
- collect execution statistics for one or more of the active QEPs and one or more stored QEPs;
store the execution statistics in the QEP repository; and expose the user to the collected execution statistics. - View Dependent Claims (14, 15, 16)
- collect execution statistics for one or more of the active QEPs and one or more stored QEPs;
-
17. An apparatus for improving query execution plan efficiency in a database management system, the apparatus comprising:
-
a receiver module configured to receive a qualified database query, the database query comprising one of a static database query and a dynamic database query; a retriever module configured to retrieve a stored query execution plan (QEP) for the database query in response a QEP repository associating the database query with an active QEP; a generation module configured to generate a new QEP for the database query in response the QEP repository failing to associate the database query with an active QEP, and storing the new QEP in the QEP repository, and designating the new QEP as the active QEP; and a binder module configured to bind the database query to the active QEP.
-
-
18. A computer program product comprising a computer readable medium having computer usable program code executable to perform operations for improving query execution plan efficiency in a database management system, the operations of the computer program product comprising:
-
receiving a qualified database query, the database query comprising one of a static database query and a dynamic database query; retrieving a stored query execution plan (QEP) for the database query in response a QEP repository associating the database query with an active QEP; generating a new QEP for the database query in response the QEP repository failing to associate the database query with an active QEP, and storing the new QEP in the QEP repository, and designating the new QEP as the active QEP; and binding the active QEP to the database query. - View Dependent Claims (19, 20)
-
Specification