[Paper Review] XQuery Join Graph Isolation
This paper proposes a plan rewriting technique that transforms complex, non-join-graph-shaped XQuery algebraic plans into structured join graphs, enabling off-the-shelf relational query optimizers to efficiently process XQuery queries. By isolating the join graph structure, the method allows standard RDBMS engines to autonomously apply advanced optimization strategies like path stitching and axis reversal, achieving high performance without custom XQuery-specific optimization.
A purely relational account of the true XQuery semantics can turn any relational database system into an XQuery processor. Compiling nested expressions of the fully compositional XQuery language, however, yields odd algebraic plan shapes featuring scattered distributions of join operators that currently overwhelm commercial SQL query optimizers. This work rewrites such plans before submission to the relational database back-end. Once cast into the shape of join graphs, we have found off-the-shelf relational query optimizers--the B-tree indexing subsystem and join tree planner, in particular--to cope and even be autonomously capable of "reinventing" advanced processing strategies that have originally been devised specifically for the XQuery domain, e.g., XPath step reordering, axis reversal, and path stitching. Performance assessments provide evidence that relational query engines are among the most versatile and efficient XQuery processors readily available today.
Motivation & Objective
- To address the challenge of inefficient XQuery processing in relational databases due to non-join-graph-shaped algebraic plans generated by XQuery compilers.
- To enable off-the-shelf relational query optimizers to handle XQuery queries effectively by transforming their execution plans into join graph form.
- To preserve XQuery's order and duplicate semantics during plan rewriting while enabling optimization.
- To demonstrate that standard RDBMS query optimizers can autonomously rediscover advanced XQuery-specific optimization techniques like path stitching and axis reversal.
- To establish a purely relational, schema-oblivious approach to XQuery processing using standard SQL query engines.
Proposed method
- The method rewrites XQuery compiler output into a single, optimized SQL-like plan block with a single FROM, WHERE, and ORDER BY clause.
- It isolates the underlying join graph structure from nested XQuery expressions, particularly from deeply nested FOR loops and scattered sort/duplicate operators.
- The transformation preserves XQuery semantics, including order and distinctness, through careful algebraic manipulation of selection, projection, and renaming operators.
- The resulting plan is expressed as a single SELECT-DISTINCT-FROM-WHERE-ORDER BY block, compatible with standard RDBMS optimization.
- The approach leverages existing RDBMS components such as B-tree indexing and join tree planners to derive efficient execution plans.
- The method is formally specified using a compilation scheme Γ;loop ⊢ e ↦ q that maps XQuery expressions to relational algebra plans.
Experimental results
Research questions
- RQ1Can a purely relational approach to XQuery processing achieve competitive performance using standard RDBMS query optimizers?
- RQ2Can off-the-shelf relational query optimizers automatically rediscover advanced XQuery-specific optimization strategies like path stitching and axis reversal?
- RQ3Does transforming non-join-graph-shaped XQuery plans into join graphs significantly improve query performance on standard RDBMS engines?
- RQ4To what extent can a schema-oblivious, purely relational encoding of XML documents support efficient XQuery evaluation?
- RQ5Can the arbitrary nesting of FOR loops in XQuery be effectively rewritten into a form that aligns with the join graph paradigm used by relational optimizers?
Key findings
- The proposed join graph isolation technique successfully transforms complex XQuery algebraic plans into forms that are natively optimized by standard RDBMS query optimizers.
- Relational query engines were found to be capable of autonomously rediscovering advanced XQuery-specific optimization strategies such as XPath step reordering, axis reversal, and path stitching.
- Performance assessments confirm that relational query engines are among the most versatile and efficient XQuery processors available today.
- The method preserves XQuery's full order and duplicate semantics while enabling efficient plan optimization.
- The approach enables the use of standard SQL query optimizers for XQuery processing without requiring custom optimization logic.
- The technique is effective even for complex XQuery Core expressions involving nested FOR loops, full axis features, and general comparisons.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.