Database Query Execution Plan Selection Based on Resource Availability
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Database query execution plans often exhibit inefficiencies due to being compiled without consideration of available processing resources, leading to suboptimal performance and resource utilization.
Innovation Solution
An apparatus and method for compiling and selecting between serial and parallel database query execution plans based on identified resource availability, using a tree structure to parse queries and determine the appropriate plan for execution, allowing for dynamic adjustment of parallelism and resource utilization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If query execution plans are compiled without consideration of resource availability, then the compilation process is simple and fast, but the performance and resource utilization of the execution plans are suboptimal
Solution Approach 1:
The system performs preliminary actions by compiling both serial and parallel execution plans in advance, storing them for later selection. This allows the complex compilation work to be done beforehand, while runtime decision-making remains simple. The patent states: 'Both a serial execution plan and a parallel execution plan are compiled' and 'information common to both the serial execution plan and the parallel execution plan may be identified. Further, such information may be stored in a common data structure'
Solution Approach 2:
The system changes parameters by dynamically selecting between serial and parallel execution plans based on resource availability. The degree of parallelism is adjusted as a parameter based on identified resource amounts. The patent states: 'a degree of parallelism may be determined for the parallel execution plan based on the identified amount of resources' and 'the serial execution plan and/or the parallel execution plan is selected, based on the identified amount of resources'
2Adaptability or versatility
If static query execution plans are used, then the compilation is straightforward, but the plans cannot accommodate specific resource availability at execution nodes
Solution Approach 1:
The system introduces dynamics by enabling runtime selection between serial and parallel execution plans based on current resource conditions. The degree of parallelism can be adjusted dynamically at execution time. The patent states: 'the degree of parallelism may be adjusted based on the identified change in the amount of resources' and 'the database query may be executed utilizing a round robin routine, if the parallel execution plan is selected'
Data Source
Figure 1A
Figure 1B
Figure 2
AI summary
A processing device parses a database query into a tree structure. Further, the processing device compiles a serial execution plan and a parallel execution plan for the database query, utilizing the tree structure. The processing device also identifies an amount of resources for executing the database query. The processing device selects the serial execution plan and/or the parallel execution plan, based on the identified amount of resources. To this end, the processing device executes the database query, utilizing the selected serial execution plan and/or the parallel execution plan.