Holistic Twig Join Cursor Movement Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing holistic twig join algorithms for evaluating path expressions in XML queries are inefficient due to excessive cursor movements and outputting all nodes, despite only a subset being required, which increases I/O operations and memory usage.
Innovation Solution
The method optimizes cursor movement by selecting the minimum cursor with the smallest begin value, virtually moving cursors within a subtree to find partial solutions, and physically advancing when necessary, while outputting only the required nodes, reducing unnecessary cursor moves and I/O operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If existing holistic twig join algorithms process all nodes in query tree, then complete structural matching is achieved, but unnecessary I/O operations and memory usage increase
Solution Approach 1:
The patent extracts and outputs only the specific nodes required by the XQuery return clause from the query tree, rather than processing and outputting all nodes. This selective extraction reduces I/O operations and memory usage while maintaining the reliability of structural matching for the required nodes.
Solution Approach 2:
The patent applies partial action by performing cursor movement and structural matching only on the subset of nodes that are required by the query, rather than exhaustively processing the entire query tree. This reduces unnecessary operations while ensuring complete processing of required nodes.
2Measurement precision
If cursors are moved frequently in inverted index, then structural matching accuracy is maintained, but I/O operations increase
Solution Approach 1:
The patent performs preliminary virtual cursor moves to advance cursors as far forward as possible without missing solutions, before executing physical cursor moves. This preliminary positioning reduces the frequency of physical I/O operations while maintaining structural matching accuracy by ensuring cursors are positioned optimally before actual data access.
Solution Approach 2:
The patent introduces virtual cursor moves as an intermediary between the logical need to advance cursors and the physical I/O operation. Virtual moves allow cursors to be positioned in memory without triggering I/O, serving as a mediator that reduces direct I/O operations while maintaining cursor positioning accuracy.
3Reliability
If all nodes are output from twig join, then complete query results are provided, but memory usage and output overhead increase
Solution Approach 1:
The patent extracts only the specific nodes required by the XQuery return clause from the query results, rather than outputting all matched nodes. This selective extraction reduces memory usage and output overhead while ensuring that all required query results are provided, maintaining the reliability of query completeness.
4Quantity of substance
If intermediate results are minimized in memory, then memory efficiency improves, but cursor movement optimization is neglected
Solution Approach 1:
The patent performs preliminary virtual cursor moves to position cursors optimally before physical moves are needed. This preliminary action reduces the total number of physical cursor moves required, improving cursor movement efficiency while maintaining memory efficiency by avoiding unnecessary intermediate result storage.
Data Source
AI summary
A holistic twig join method with optimal cursor movement is disclosed. The method in one aspect minimizes the number of cursor moves by looking more globally at the query's state to determine which cursor to move next and making virtual moves where a physical move is not needed. The method in another aspect reduces the number of cursor moves by skipping over nodes that do not need to be output.


