XML Query Predicate Handling via Path-Based Row Source Caching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Storing and querying large XML data in relational databases is inefficient due to the increased processing time required for binary-encoded XML, as existing methods do not effectively optimize the evaluation of XPath expressions on binary data.
Innovation Solution
Implementing a caching mechanism within the database server to optimize the evaluation of XPath expressions by re-writing queries, using a small cache structure that stores reference locators instead of copying XML data, and enabling predicate evaluation within the optimized path-based row source to reduce redundant computations and improve performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If binary-encoded XML is used for storage, then storage efficiency and network transmission are improved, but query processing time increases due to decoding requirements
Solution Approach 1:
The patent pre-evaluates XPath expressions and caches the results during the first query execution. Subsequent queries can directly use the cached results without re-decoding and re-evaluating the binary XML data, thus resolving the time penalty of binary encoding while maintaining storage efficiency
Solution Approach 2:
The patent creates a cache copy of the evaluated XPath results rather than copying the entire binary XML data. This cache structure stores pre-computed values that can be quickly retrieved without decoding operations, balancing storage efficiency with query speed
2Quantity of substance
If XPath expressions are evaluated on binary-encoded XML data, then data compactness is maintained, but additional computation is required for decoding and interpretation
Solution Approach 1:
The system performs XPath evaluation in advance and caches the results. When the same XPath expression is queried again, the cached result is returned without re-decoding the binary data, thus maintaining data compactness while reducing computation complexity for subsequent queries
Solution Approach 2:
The patent introduces a cache structure as an intermediary between the binary XML storage and the query processing. This cache stores pre-evaluated results, eliminating the need for repeated decoding and evaluation computations while maintaining the compact binary storage format
3Reliability
If redundant XPath evaluations are performed, then query results are obtained, but processing time increases due to repeated computations
Solution Approach 1:
The patent implements a feedback mechanism where the cache stores previously evaluated XPath results. When a query is received, the system checks the cache first, and if the result exists, it returns the cached value immediately. This feedback loop eliminates redundant evaluations while ensuring query result accuracy through verified cached data
Data Source
AI summary
The approaches described herein provide an efficient way to process certain kinds of queries that retrieve XML data stored in an object-relational database. An XML query may include a predicate condition that joins two row sources. One or both of the row sources required for predicate evaluation may be path-based; that is, consume and produce rows of XMLType data. Such a path-based row source may be modified to use the predicate condition to filter the rows it generates so that only rows satisfying the predicate condition need to be further processed. A small cache structure introduced into the path-based row source may be used to optimize the evaluation of the predicate row. Once populated with row data, the cache structure may be reorganized to optimize the performance of predicate evaluation.


