XML Pre-Filter for XPath Processing Efficiency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing XML query processing systems face inefficiencies when rewriting queries to evaluate XPath expressions early, leading to issues like the multiple-consumer problem and suboptimal data filtering, which hinder performance and index usage.
Innovation Solution
The implementation of pre-filters within the XML query rewrite method, where an XPath is identified and transformed into a pre-filter, executed before the original XPath expression, to remove unwanted data early and improve query efficiency without altering the query's semantics.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If XPath extraction is pushed down into lower query blocks to filter data early, then query processing efficiency is improved, but the multiple-consumer problem occurs when other parts of the query refer to the result of the pushed-down block
Solution Approach 1:
The patent creates a copy of the XPath filter logic and applies it as a pre-filter before the original XPath evaluation. This copying approach allows the filter to be executed early on the data stream without altering the original XPath expression or its results, thereby avoiding the multiple-consumer problem while still achieving early filtering benefits
Solution Approach 2:
The patent implements preliminary filtering by evaluating the XPath expression on a sample or subset of data before the main query execution. This preliminary action identifies filtering criteria that can be safely applied early, allowing the system to prepare filter conditions in advance without interfering with subsequent query operations that may depend on the original data
2Productivity
If XPath expressions are evaluated early to filter unwanted items, then data operations are reduced, but memory usage increases for temporary data storage during query rewriting
Solution Approach 1:
The patent extracts the filtering logic from the main XPath evaluation and separates it into a distinct pre-filtering phase. By taking out only the essential filtering criteria from the full XPath expression, the system can apply simple filters early without storing large amounts of temporary data, while the full XPath evaluation proceeds separately on the filtered results
Data Source
AI summary
A system and method is provided for XML query processing includes an execution compiler for transforming an XML query into an executable XML query plan. A query rewrite processor performs query transformation on the XML query, the query transformations including transforming an XPath within said XML Query into a pre-filter. The XML query is then transformed into a transformed XML query which includes the pre-filter.


