Runtime query optimization for dynamically selecting from multiple plans in a query based upon runtime-evaluated performance criterion
First Claim
1. A computer-implemented method of executing a database query, the method comprising:
- (a) dynamically evaluating at least one performance criterion for a query during execution of at least a portion of the query;
(b) selecting one of a plurality of query implementations defined in the query based upon the dynamically-evaluated performance criterion; and
(c) continuing execution of the query using the selected query implementation;
wherein dynamically evaluating the performance criterion includes accessing a query data structure that includes the plurality of query implementations to obtain the performance criterion, and wherein continuing execution of the query includes executing the selected query implementation in the query data structure.
1 Assignment
0 Petitions
Accused Products
Abstract
An apparatus, program product and method perform runtime query optimization during execution of a query to select from among multiple available plans, or implementations, capable of implementing the query. The runtime query optimization utilizes a runtime-derived performance criterion to dynamically select from among multiple query implementations. A performance criterion is dynamically evaluated during execution of at least a portion of a query, and one of a plurality of query implementations defined in the query is selected based upon the dynamically-evaluated performance criterion. Once selected, execution of the query is continued using the selected query implementation.
-
Citations
23 Claims
-
1. A computer-implemented method of executing a database query, the method comprising:
-
(a) dynamically evaluating at least one performance criterion for a query during execution of at least a portion of the query;
(b) selecting one of a plurality of query implementations defined in the query based upon the dynamically-evaluated performance criterion; and
(c) continuing execution of the query using the selected query implementation;
wherein dynamically evaluating the performance criterion includes accessing a query data structure that includes the plurality of query implementations to obtain the performance criterion, and wherein continuing execution of the query includes executing the selected query implementation in the query data structure. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. An apparatus, comprising:
-
(a) a memory within which is resident at least a portion of a database; and
(b) program code configured to execute a database query by dynamically evaluating at least one performance criterion for the query during execution of at least a portion of the query, selecting one of a plurality of query implementations defined in the query based upon the dynamically-evaluated performance criterion, continuing execution of the query using the selected query implementation;
wherein the program code is configured to dynamically evaluate the performance criterion by accessing a query data structure that includes the plurality of query implementations to obtain the performance criterion, and to continue execution of the query by executing the selected query implementation in the query data structure. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A program product, comprising:
-
(a) program code configured to execute a database query by dynamically evaluating at least one performance criterion for the query during execution of at least a portion of the query, selecting one of a plurality of query implementations defined in the query based upon the dynamically-evaluated performance criterion, continuing execution of the query using the selected query implementation; and
(b) a signal bearing medium bearing the program code;
wherein the program code is configured to dynamically evaluate the performance criterion by accessing a query data structure that includes the plurality of query implementations to obtain the performance criterion, and to continue execution of the query by executing the selected query implementation in the query data structure. - View Dependent Claims (18)
-
-
19. A computer-implemented method of generating a query data structure, the method comprising:
-
(a) identifying a plurality of implementations capable of implementing at least a portion of a query; and
(b) building a query data structure for use in implementing the query, the query data structure including the plurality of implementations and at least one performance criterion for use in selecting one of the plurality of implementations to execute during execution of the query;
wherein building the query data structure includes building a query object, the query object including a query tree having a switch node and a plurality of child nodes, the switch node configured to evaluate the performance criterion and at least one of the child nodes configured to implement at least a portion of one of the plurality of implementations. - View Dependent Claims (20, 21, 22, 23)
-
Specification