Techniques for improving the performance of complex queries
First Claim
Patent Images
1. A method implemented and programmed within a non-transitory computer-readable storage medium and processed by a processor, the processor configured to execute the method, comprising:
- determining, at the processor, whether to execute a request via a static plan generation or a dynamic plan generation, wherein determining comprises;
producing, at the processor, a static plan by using the static plan generation to evaluate costs and conditions of the static plan;
selecting, at the processor, to process one of the dynamic plan generation for the request and the static plan for the request, and wherein selecting to process the dynamic plan generation comprises processing statistical information from intermediate spools, and wherein no portion of the dynamic plan is generated prior to selection;
in response to selection of the dynamic plan generation;
sequentially fragmenting, at the processor, the request into a plurality of request fragments;
generating, at the processor, a first plan fragment corresponding to a first request fragment from the plurality of request fragments; and
executing, at the processor, the first plan fragment; and
for each other request fragment;
generating, at the processor, a corresponding plan fragment in response to execution of an immediately preceding plan fragment;
executing, at the processor, the corresponding plan fragment; and
providing, at the processor, feedback based on execution of the corresponding plan fragment to a remaining portion of the request, wherein execution of a last plan fragment completes the request.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques for improving complex database queries are provided. A determination is made whether to adopt a static or dynamic query execution plan based on metrics. When the dynamic query execution plan is used, a request fragment of the request is planned and the corresponding plan fragment is executed. The processed fragment provides feedback related to its processing to the remaining request and the process is repeated on the remaining request until the request is completed.
27 Citations
18 Claims
-
1. A method implemented and programmed within a non-transitory computer-readable storage medium and processed by a processor, the processor configured to execute the method, comprising:
-
determining, at the processor, whether to execute a request via a static plan generation or a dynamic plan generation, wherein determining comprises; producing, at the processor, a static plan by using the static plan generation to evaluate costs and conditions of the static plan; selecting, at the processor, to process one of the dynamic plan generation for the request and the static plan for the request, and wherein selecting to process the dynamic plan generation comprises processing statistical information from intermediate spools, and wherein no portion of the dynamic plan is generated prior to selection; in response to selection of the dynamic plan generation; sequentially fragmenting, at the processor, the request into a plurality of request fragments; generating, at the processor, a first plan fragment corresponding to a first request fragment from the plurality of request fragments; and executing, at the processor, the first plan fragment; and for each other request fragment; generating, at the processor, a corresponding plan fragment in response to execution of an immediately preceding plan fragment; executing, at the processor, the corresponding plan fragment; and providing, at the processor, feedback based on execution of the corresponding plan fragment to a remaining portion of the request, wherein execution of a last plan fragment completes the request. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method implemented and programmed within a non-transitory computer-readable storage medium and processed by a processor, the processor configured to execute the method, comprising:
-
evaluating, at the processor, a query to produce a dynamic query plan for a query optimizer by producing a static plan and evaluating costs and conditions of that static plan and determining that the dynamic query plan is optimal for processing the query, and wherein when determining that the dynamic query plan is optimal for processing the query further comprises processing statistical information from intermediate spools as feedback details, and wherein no portion of the dynamic plan is produced prior to determining that the dynamic query plan is optimal for processing the query; iterating, at the processor, the query to produce a plurality of request fragments, and generating a plan fragment for each request fragment, wherein each plan fragment is generated in response to execution of a prior plan fragment; and sequentially passing, at the processor, the feedback details from executing each plan fragment to the remaining query. - View Dependent Claims (8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A system, comprising:
-
memory configured with a query plan selector that processes on a processor of a network; and the memory configured with a dynamic query plan manager that processes on the processor of the network; wherein the query plan selector is configured to initially generate a static plan for a request and make a determination as to whether to use the static plan with the request or to generate and to use a dynamic plan for the request based on evaluation of costs and conditions for that static plan, wherein no portion of the dynamic plan is generated prior to selection of the dynamic plan, and wherein the dynamic query plan manager is configured to process components of the request and sequentially generate request fragments and their corresponding plan fragments, wherein execution of each plan fragment provides feedback to the remaining request and processing statistical information from intermediate spools as the feedback fragment, and wherein each plan fragment is generated in response to execution of a prior plan fragment. - View Dependent Claims (18)
-
Specification