Let a single FLWOR bloom: (to improve XQuery plan generation)

To globally optimize execution plans for XQuery expressions, a plan generator must generate and compare plan alternatives. In proven compiler architectures, the unit of plan generation is the query block. Fewer query blocks mean a larger search space for the plan generator and lead to a generally higher quality of the execution plans. The goal of this paper is to provide a toolkit for developers of XQuery evaluators to transform XQuery expressions into expressions with as few query blocks as possible. Our toolkit takes the form of rewrite rules merging the inner and outer FLWOR expressions into single FLWORs. We focus on previously unpublished rewrite rules and on inner FLWORs occurring in the for, let, and return clauses in the outer FLWOR.

[1]  Divesh Srivastava,et al.  Holistic twig joins: optimal XML pattern matching , 2002, SIGMOD '02.

[2]  Harry K. T. Wong,et al.  Optimization of nested SQL queries revisited , 1987, SIGMOD '87.

[3]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[4]  Hamid Pirahesh,et al.  Extensible/rule based query rewrite optimization in Starburst , 1992, SIGMOD '92.

[5]  Jérôme Siméon,et al.  Put a Tree Pattern in Your Algebra , 2007, 2007 IEEE 23rd International Conference on Data Engineering.

[6]  Umeshwar Dayal,et al.  Of Nests and Trees: A Unified Approach to Processing Queries That Contain Nested Subqueries, Aggregates, and Quantifiers , 1987, VLDB.

[7]  Goetz Graefe,et al.  Query evaluation techniques for large databases , 1993, CSUR.

[8]  Sven Helmer,et al.  Anatomy of a native XML base management system , 2002, The VLDB Journal.

[9]  Norman May,et al.  XQuery Processing in Natix with an Emphasis on Join Ordering , 2004, XIME-P.

[10]  Scott Boag,et al.  XQuery 1.0 : An XML Query Language , 2007 .

[11]  Hamid Pirahesh,et al.  Complex query decorrelation , 1996, Proceedings of the Twelfth International Conference on Data Engineering.

[12]  Jignesh M. Patel,et al.  Structural joins: a primitive for efficient XML query pattern matching , 2002, Proceedings 18th International Conference on Data Engineering.

[13]  Jan Hidders,et al.  Avoiding Unnecessary Ordering Operations in XPath , 2003, DBPL.

[14]  Guido Moerkotte,et al.  Let a Single FLWOR Bloom , 2007, XSym.

[15]  Torsten Grust,et al.  Tree Awareness for Relational DBMS Kernels: Staircase Join , 2003, Intelligent Search on XML Data.

[16]  Norman May,et al.  Strategies for query unnesting in XML databases , 2006, TODS.

[17]  Marcus Fontoura,et al.  Querying XML streams , 2005, The VLDB Journal.