XML Query Evaluation Using Early-Outs and Multi-Pass Logic
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current XML query evaluation methods are inefficient as they often evaluate all steps of a query, even when early exit conditions are met, particularly for logical expressions like 'AND' and 'OR', which can terminate evaluation prematurely.
Innovation Solution
Implement a method and apparatus that use early-outs and multiple passes for XML query evaluation, rewriting queries to prioritize more selective steps and switching to single-pass evaluation when necessary, allowing early exit when exitable conditions are met, and deferring less selective steps when reordering is incomplete.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a single-pass evaluation procedure is used to evaluate all steps of an XML query sequentially, then the evaluation is simple to implement and ensures complete data gathering, but it performs unnecessary evaluations even when early exit conditions are met, reducing query efficiency
Solution Approach 1:
The patent applies dynamics by making the evaluation procedure adaptable - it can switch between single-pass and multi-pass modes based on the query characteristics. The system dynamically determines whether early exit is possible and adjusts the evaluation strategy accordingly, rather than using a fixed single-pass approach for all queries.
Solution Approach 2:
The patent segments the query evaluation into multiple passes, where each pass evaluates specific steps of the XML query. This segmentation allows the system to evaluate only necessary steps in certain passes and exit early when conditions are met, rather than evaluating all steps in a single continuous pass.
2Productivity
If a multi-pass evaluation procedure is used to enable early exits, then unnecessary evaluation steps are reduced, but the complexity of the evaluation procedure increases due to query rewriting and pass coordination
Solution Approach 1:
The patent applies preliminary action by performing query rewriting before the actual evaluation process. The query is transformed into an equivalent form that facilitates multi-pass evaluation and early exit during the evaluation phase. This preliminary transformation simplifies the overall process by preparing the query in advance rather than managing complexity during execution.
3Loss of time
If steps are reordered to evaluate more selective steps first, then early exit conditions are met faster, but the query rewriting process adds complexity and may not be applicable to all query types
Solution Approach 1:
The patent applies parameter changes by reordering the evaluation steps based on their selectivity characteristics. Steps that are more likely to determine the query result early (more selective steps) are evaluated first, while less selective steps are deferred. This reordering changes the evaluation sequence parameter to optimize for early exit while maintaining query correctness.
Data Source
AI summary
A method and apparatus is disclosed for XML query evaluation using early-outs and multiple passes to evaluate an XML query. A multi-pass evaluation procedure evaluates the XML query one step at a time as needed to complete evaluation. The multi-pass evaluation procedure evaluates XML queries containing logical expressions such as “AND” expressions, “OR” expressions, and implied “AND” expressions within “FOR” clauses. Queries containing logical expressions are often satisfied before every component is evaluated. Thus, executing the multi-pass evaluation procedure allows the evaluation to exit early when the veracity of the query is determined, not necessarily when every component has been evaluated. The multi-pass evaluation procedure executes as long as a descendant axis of the XML query need not be evaluated past a child node. When evaluation of a descendant axis past a child node is required, the multi-pass evaluation procedure may switch to a single-pass evaluation procedure to complete evaluation.


