Dynamic XML Query Execution Plan Selection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
XML database query optimization strategies fail to provide consistent results and efficient processing, especially when not all relevant information is known during compilation, and database statistics are not updated in response to data modifications, leading to unacceptable response times.
Innovation Solution
A method that compiles XML database queries to generate two alternative execution plans providing the same response, with a dynamic switch to select the most effective plan during runtime based on assessed costs and intermediate results, potentially using or omitting XML database indexes depending on data content.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a single query execution plan is compiled during compile time, then the query processing structure is simple, but the query response time increases and efficiency decreases when data conditions change
Solution Approach 1:
The patent applies dynamics by transforming the static query execution plan into a dynamic structure that can adapt to changing data conditions. The system compiles multiple alternative execution plans and selects the optimal one at runtime based on current database statistics, allowing the query processing system to respond dynamically to changing data states without requiring full re-compilation.
Solution Approach 2:
The patent utilizes parameter changes by varying key parameters of the execution plan such as access paths, join orders, and filter conditions based on database statistics. The query optimizer adjusts these parameters dynamically by selecting from pre-compiled alternatives, enabling efficient adaptation to changing data distributions and conditions without fundamental structural changes to the query processing system.
2Productivity
If database statistics are updated frequently to maintain optimization accuracy, then query execution efficiency improves, but the system response time to data modifications decreases and performance deteriorates
Solution Approach 1:
The patent applies preliminary action by pre-compiling multiple alternative execution plans during the compilation phase, before runtime execution. This allows the system to have optimization options ready in advance without needing to update statistics frequently. At runtime, the system simply selects from these pre-prepared alternatives based on current statistics, avoiding the time-consuming process of frequent statistic updates while maintaining efficient query execution.
3Productivity
If multiple alternative execution plans are compiled and dynamically selected, then query execution efficiency improves and response times reduce, but the compilation complexity and memory requirements increase
Solution Approach 1:
The patent applies segmentation by dividing the query execution plan into multiple independent alternative paths that can be separately compiled and evaluated. Each alternative represents a different execution strategy (e.g., different access paths, join orders, or filter applications). This segmentation allows the system to manage complexity by treating each alternative as a discrete unit that can be independently optimized, stored, and selected based on runtime conditions.
4Reliability
If exhaustive search is performed over the entire database, then query result completeness is ensured, but the response time becomes unacceptable for large databases
Solution Approach 1:
The patent applies partial action by using database statistics to estimate the cost and benefit of different execution paths, allowing the system to select plans that are sufficient for achieving complete and accurate results without necessarily examining every possible execution path or scanning the entire database exhaustively. The statistics guide the selection of plans that will find all relevant results efficiently.
Data Source
AI summary
Executing a XML database query. The method may include compiling the XML database query to provide at least two alternative execution plans, wherein the at least two alternative execution plans provide the same response to the XML database query. The method may further include deciding during runtime, which of the at least two alternative execution plans is executed. The method may include executing the selected execution plan.


