Document Type


Publication Date



XQuery, the defacto XML query language, is typically composed of highly nested expressions. Iterative execution of such expressions tends to be intuitive but inefficient. Instead, decorrelation of nested XQuery expressions opens up the opportunity for significant query optimization. Although several algorithms have been proposed to optimize nested XQueries, these works pay little attention to the ordered semantics of XQuery expressions. The appropriate extension of decorrelation to XQuery with multiple level orderby clauses and other order sensitive functions hence represents an important and non-trivial task. We propose an algebraic rewriting technique of nested XQuery expressions containing explicit orderby clauses. The proposed work successfully addresses the challenges caused by the hierarchical nature and the ordered semantics of XQuery expressions. Using a running example, our decorrelation algorithm is illustrated. Further, we show the performance gain achievable by our approach via an experimental study.