Holistic Twig Join Cursor Movement Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvecompleteness of structural matchingVSAvoidquery processing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

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.

Inventive Principle:
Principle #2Taking out (Extraction)

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.

Inventive Principle:
Principle #16Partial or excessive action

2Measurement precision

If cursors are moved frequently in inverted index, then structural matching accuracy is maintained, but I/O operations increase

Engineering Contradiction:
Improvestructural matching accuracyVSAvoidI/O operations
Core Design Contradiction:
Measurement precisionVSLoss of energy

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If all nodes are output from twig join, then complete query results are provided, but memory usage and output overhead increase

Engineering Contradiction:
Improvecompleteness of query resultsVSAvoidmemory usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

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.

Inventive Principle:
Principle #2Taking out (Extraction)

4Quantity of substance

If intermediate results are minimized in memory, then memory efficiency improves, but cursor movement optimization is neglected

Engineering Contradiction:
Improvememory efficiencyVSAvoidcursor movement efficiency
Core Design Contradiction:
Quantity of substanceVSProductivity

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.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS7502802B2Optimizing cursor movement in holistic twig joins
Publication Date: 2009.03.10 SAP SE
  • US7502802B2 patent drawing
  • US7502802B2 patent drawing
  • US7502802B2 patent drawing

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.