Path-Based Query Operator for XML Predicate Evaluation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for querying binary-encoded XML data in object-relational databases are inefficient due to the additional processing required for decoding binary XML, which hinders performance despite reducing storage size and network bandwidth consumption.

Innovation Solution

The approach involves rewriting XQuery expressions into optimized SQL queries using enhanced path-based query operators that eliminate unnecessary path-based query operators, allowing only rows that satisfy the predicate condition to be generated, thereby reducing computational overhead and improving query execution efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If binary-encoded XML data is stored in the database, then storage size is reduced and network bandwidth consumption is reduced, but query processing time increases due to additional decoding requirements

Engineering Contradiction:
Improvestorage sizeVSAvoidquery processing time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-computing and storing path-based predicate results during the XML data encoding process. When XML data is stored in binary format, the system预先 evaluates path expressions and stores the results alongside the encoded data. This allows query execution to skip the decoding and path evaluation steps, directly using the pre-computed results to filter rows, thereby resolving the contradiction between compact storage and fast querying.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If traditional path-based query operators are used to query binary XML data, then complete XPath evaluation is performed, but unnecessary computations are executed and query performance deteriorates

Engineering Contradiction:
ImproveXPath evaluation completenessVSAvoidquery execution efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent extracts the predicate evaluation function from the traditional path-based query operator. Instead of performing complete XPath evaluation followed by predicate filtering, the system separates the path matching and predicate evaluation into distinct operations. The enhanced query operator directly evaluates only the predicate portion using pre-computed path results, eliminating unnecessary computations while maintaining evaluation accuracy. This extraction principle resolves the contradiction between complete evaluation and execution efficiency.

Inventive Principle:
Principle #2Taking out (Extraction)

3Loss of information

If multiple path-based query operators are used in the query plan, then comprehensive data retrieval is achieved, but the complexity of the query execution plan increases and performance decreases

Engineering Contradiction:
Improvedata retrieval completenessVSAvoidquery operator count
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent merges multiple path-based query operators into a single enhanced operator that combines path matching and predicate evaluation functions. By integrating these operations into one operator that leverages pre-computed path results, the system reduces the number of operators in the query execution plan while maintaining complete data retrieval capabilities. This merging directly addresses the contradiction between comprehensive retrieval and plan complexity.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS8161035B2Query optimization by specifying path-based predicate evaluation in a path-based query operator
Publication Date: 2012.04.17 ORACLE INT CORP
  • US8161035B2 patent drawing
  • US8161035B2 patent drawing
  • US8161035B2 patent drawing

AI summary

The approaches described herein provide an efficient way for a database server to process certain kinds of queries over XML data stored in an object-relational database that require the evaluation of a predicate expression with one or more path-based operands. A predicate expression part of a XQuery or SQL WHERE clause that returns a boolean value. A database server first determines whether the query qualifies for this particular kind of optimization, then rewrites the query using an enhanced query operator syntax for specifying the predicate expression to be evaluated. The enhanced query operator subsumes the work of a second path-based query operator, resulting in the suppression of the WHERE EXISTS subquery. The rewritten query operator is used to generate a query execution plan that provides for several query execution optimizations.