Skip to main content
QUICK REVIEW

[Paper Review] Fast In-Memory XPath Search over Compressed Text and Tree Indexes

Diego Arroyuelo, Francisco Claude|arXiv (Cornell University)|Jul 13, 2009
Algorithms and Data CompressionComputer Science56 references9 citations
TL;DR

This paper presents SXSI, a fast in-memory XPath query system that uses compressed self-indexes for both XML text and tree structures. By integrating a compressed text index (RLCSA) with a succinct tree representation (bitvector of parentheses and labels), SXSI enables efficient hybrid XPath queries through tree automata and adaptive query optimization, achieving 1–3 orders of magnitude speedup over existing systems on text-rich queries while using under twice the document size in memory.

ABSTRACT

A large fraction of an XML document typically consists of text data. The XPath query language allows text search via the equal, contains, and starts-with predicates. Such predicates can efficiently be implemented using a compressed self-index of the document's text nodes. Most queries, however, contain some parts of querying the text of the document, plus some parts of querying the tree structure. It is therefore a challenge to choose an appropriate evaluation order for a given query, which optimally leverages the execution speeds of the text and tree indexes. Here the SXSI system is introduced; it stores the tree structure of an XML document using a bit array of opening and closing brackets, and stores the text nodes of the document using a global compressed self-index. On top of these indexes sits an XPath query engine that is based on tree automata. The engine uses fast counting queries of the text index in order to dynamically determine whether to evaluate top-down or bottom-up with respect to the tree structure. The resulting system has several advantages over existing systems: (1) on pure tree queries (without text search) such as the XPathMark queries, the SXSI system performs on par or better than the fastest known systems MonetDB and Qizx, (2) on queries that use text search, SXSI outperforms the existing systems by 1--3 orders of magnitude (depending on the size of the result set), and (3) with respect to memory consumption, SXSI outperforms all other systems for counting-only queries.

Motivation & Objective

  • To design a compact, in-memory index for XML data that supports efficient XPath query evaluation without relying on disk storage.
  • To integrate compressed self-indexes for both text content and tree structure into a unified query system.
  • To optimize query execution order by leveraging fast counting on the text index to choose between top-down and bottom-up traversal.
  • To achieve high performance on hybrid XPath queries involving both structural and text-based predicates.
  • To ensure memory usage remains within a factor of two of the original document size, enabling full in-memory operation.

Proposed method

  • Represent the XML tree structure using a bitvector of opening and closing parentheses, augmented with a label sequence for nodes.
  • Store all text nodes in a global compressed self-index using the RLCSA (Run-Length Compressed Suffix Array) data structure.
  • Use tree automata to evaluate XPath queries, dynamically choosing top-down or bottom-up traversal based on fast counting results from the text index.
  • Leverage succinct data structures for efficient rank/select operations on the bitvector and text index for fast navigation and pattern matching.
  • Extend the text index to support PSSM (Position-Specific Scoring Matrix) queries for biological sequence patterns without modifying the core query engine.
  • Optimize query evaluation by isolating text index extensions (e.g., PSSM) while keeping the tree and automaton logic unchanged.

Experimental results

Research questions

  • RQ1Can a compressed, in-memory index for XML outperform existing systems on hybrid XPath queries involving both structure and text?
  • RQ2How can query execution strategy be automatically selected (top-down vs. bottom-up) to maximize performance based on index characteristics?
  • RQ3To what extent can a self-indexed XML representation reduce memory usage while supporting efficient XPath evaluation?
  • RQ4Can advanced text indexing techniques like PSSM be integrated into an XPath engine without modifying its core logic?
  • RQ5How does the performance of the system scale across different result set sizes and query types?

Key findings

  • On pure tree queries (e.g., XPathMark), SXSI performs on par or better than MonetDB and Qizx, the fastest known systems.
  • On hybrid queries involving text search, SXSI outperforms existing systems by 1–3 orders of magnitude, depending on result set size.
  • For all tested data and queries, SXSI’s memory consumption remains consistently under two times the size of the original XML document.
  • PSSM-based queries on biological sequences (e.g., promoter and exon regions) are efficiently supported, with end-to-end query times under 100ms for large result sets.
  • The system’s performance advantage is especially pronounced for text-heavy queries, with the text index contributing significantly to speedup via fast counting.
  • The modular design allows adding new text query capabilities (e.g., PSSM) without modifying the tree or automaton components, demonstrating extensibility.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.