Executing alternative plans for a SQL statement
First Claim
Patent Images
1. A method of generating output for analyzing how well a query optimizer generates alternate execution plans and selects an optimal execution plan, the method comprising:
- receiving a query;
in response to receiving the query, automatically performing;
generating at least two alternate execution plans for the received query, wherein each alternate execution plan of the at least two alternate execution plans defines operations for executing said received query differently from each other alternate execution plan of the at least two alternate execution plans;
for each execution plan of the at least two alternate execution plans, causing execution of said received query by a database server that performs the operations defined by the execution plan;
wherein the step of causing execution of said received query for each execution plan of the at least two alternate execution plans causes at least two executions of the received query; and
generating and storing output that describes characteristics of each of the at least two executions of said received query that is executed according to the operations defined by the execution plan of the at least two alternate execution plans;
wherein the output is useable for analyzing how well the query optimizer generates alternate execution plans and selects the optimal execution plan;
wherein the method is performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
Under automated alternate plan analysis, a query optimizer generates candidate execution plans. The candidate execution plans are selected as alternate execution plans for the query and execution. Output describing characteristics of each alternate execution plan and/or its execution is generated and/or compared. From this information, it may be determined, for example, whether results returned by any of the alternate execution plans are the same and whether the least cost execution plan is actually the most efficiently executed.
120 Citations
28 Claims
-
1. A method of generating output for analyzing how well a query optimizer generates alternate execution plans and selects an optimal execution plan, the method comprising:
-
receiving a query; in response to receiving the query, automatically performing; generating at least two alternate execution plans for the received query, wherein each alternate execution plan of the at least two alternate execution plans defines operations for executing said received query differently from each other alternate execution plan of the at least two alternate execution plans; for each execution plan of the at least two alternate execution plans, causing execution of said received query by a database server that performs the operations defined by the execution plan; wherein the step of causing execution of said received query for each execution plan of the at least two alternate execution plans causes at least two executions of the received query; and generating and storing output that describes characteristics of each of the at least two executions of said received query that is executed according to the operations defined by the execution plan of the at least two alternate execution plans; wherein the output is useable for analyzing how well the query optimizer generates alternate execution plans and selects the optimal execution plan; wherein the method is performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A non-transitory computer-readable storage medium that stores instructions which, when executed by one or more processors, cause the one of more processors to generate output for analyzing how well a query optimizer generates alternate execution plans and selects an optimal execution plan by causing the one or more processors to perform:
-
receiving a query; in response to receiving the query, automatically performing; generating at least two alternate execution plans for the received query, wherein each alternate execution plan of the at least two alternate execution plans defines operations for executing said received query differently from each other alternate execution plan of the at least two alternate execution plans; for each execution plan of the at least two alternate execution plans, causing execution of said received query by a database server that performs the operations defined by the execution plan; wherein the step of causing execution of said received query for each execution plan of the at least two alternate execution plans causes at least two executions of the received query; and generating and storing output that describes characteristics of each of the at least two executions of said received query that is executed according to the operations defined by the execution plan of the at least two alternate execution plans; wherein the output is useable for analyzing how well the query optimizer generates alternate execution plans and selects the optimal execution plan. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28)
-
Specification