Efficient evaluation of XQuery over streaming data
Xiaogang Li, Gagan Agrawal · 2005
With the growing popularity of XML and emer-gence of streaming data model, processing queries over streaming XML has become an important topic. This paper presents a new framework and a set of techniques for processing XQuery over streaming data. As compared to the existing work on supporting XPath/XQuery over data streams, we make the following three contributions: 1. We propose a series of optimizations which transform XQuery queries so that they can be cor-rectly executed with a single pass on the dataset. 2. We present a methodology for determining when an XQuery query, possibly after the trans-formations we introduce, can be correctly exe-cuted with only a single pass on the dataset. 3. We describe a code generation approach which can handle XQuery queries with user-dened ag-gregates, including recursive functions. We ag-gressively use static analysis and generate exe-cutable code, i.e., do not require a query plan to be interpreted at runtime. We have evaluated our implementation using sev-eral XMark benchmarks and three other XQuery queries driven by real applications. Our ex-perimental results show that as compared to Qizx/Open, Saxon, and Galax, our system: 1) is at least 25 % faster on XMark queries with small datasets, 2) is signicantly faster on XMark queries with larger datasets, 3) at least one or-der of magnitude faster on the queries driven by real applications, as unlike other systems, we can