Improving XML Querying with Maximal Frequent Query Patterns

Yijun Bei, Gang Chen, Jinxiang Dong

Abstract

Querying XML data is computationally intensive due to its semi-structured nature and the complexity of path-based languages like XPath. Traditional caching methods often suffer from root-level bias and data redundancy. This paper introduces a system that caches "Maximal Frequent Query Patterns" (MFQP)—the largest common sub-structures in user queries. By storing only maximal patterns, the system optimizes cache space and employs a recursive rewriting algorithm to answer new queries efficiently. Experimental results on the XMARK dataset demonstrate that MFQP achieves superior hit ratios and lower response times compared to standard LRU and FQP policies.

Introduction

The flexibility of XML comes at the cost of query performance. As datasets grow, the overhead of parsing and navigating hierarchical structures becomes a bottleneck. While caching is a common solution, existing XML caches often fail to capture frequent sub-queries that do not start at the document root, or they waste space by caching every frequent sub-pattern (the Apriori property redundancy).

The MFQP Framework

The core innovation of this work is the focus on Maximal Frequent Query Patterns. A pattern is considered "maximal" if it is frequent (appearing above a certain support threshold) but is not a sub-pattern of any other frequent pattern.

Query Pattern Trees and Subtrees

By caching only these maximal trees, the system implicitly covers all their constituent sub-trees without the storage overhead of redundant entries. The system dynamically adjusts the "minimum support" threshold based on cache pressure, ensuring that only the most valuable patterns are retained.

Query Rewriting and Semantic Matching

To maximize the utility of the cache, the authors developed a sophisticated query rewriting engine. Beyond simple exact matches, the system identifies semantic matching and containment. This allows the cache to satisfy queries containing wildcards (*) or descendant axes (//) using more specific cached results.

Semantic matching example

When a new query arrives, the recursive algorithm attempts to decompose it into parts that can be served by the cache. If a partial match (containment) is found, the system retrieves the cached portion and only executes the remaining "missing" path expressions against the source XML document.

Experimental Evaluation

The researchers evaluated the MFQP approach using the XMARK benchmark with a 116MB XML document and a query workload of up to 100,000 requests. Key findings include:

  • Performance: MFQP consistently outperformed Least Recently Used (LRU) and standard Frequent Query Pattern (FQP) methods in terms of average response time.
  • Efficiency: The hit ratio for MFQP reached between 0.7 and 0.8, significantly higher than traditional methods, validating the effectiveness of maximal pattern selection.
  • Scalability: Response times remained stable even as query volume scaled, indicating robust performance for high-traffic environments.

Conclusion and Future Work

The MFQP approach provides a lean and effective way to accelerate XML queries by focusing on structural commonalities. While the current implementation uses an approximate top-down search for containment to minimize overhead, future work could explore more exhaustive matching techniques. Additionally, extending the framework to handle dynamic XML updates and optimizing the trigger points for pattern mining are promising directions for further research.

Summary updated

BibTeX
@inproceedings{bei2007improving,
  author = {Yijun Bei and Gang Chen and Jinxiang Dong},
  title = {{Improving XML Querying with Maximal Frequent Query Patterns}},
  booktitle = {International Conference on Computational Science},
  year = {2007},
  doi = {10.1007/978-3-540-72584-8\_34},
}
Figure