— XQuery, the defacto XML query language, is a functional language with operational semantics, which precludes the direct application of classical query optimization techniques. The features of XQuery, such as nested expressions and ordered semantics, further aggravate this situation. The appropriate extension of existing optimization techniques to XQuery processing hence represents an important and non-trivial task. We propose an algebraic rewriting technique of nested XQuery expressions containing explicit orderby clauses. Unlike prior work, this technique enables the optimization of nested XQuery expressions not only with set but also with ordered sequence semantics. Our technique is based on two steps. First, we perform algebraic query unnesting. Second, we apply query minimization techniques that exploit pairwise XPath set containment after pulling up ordersensitive operations. We illustrate how our proposed technique is able to not only successfully tackle the XQuery logical op...
Song Wang, Elke A. Rundensteiner, Murali Mani