Indexing Queries in Lux

Michael Sokolov · Balisage series on markup technologies · 2013

Query optimizers often mystify database users: sometimes queries run quickly and sometimes they don’t. An intuitive grasp of what will work well in an optimizer is often gained only after trial, error, inductive logic (i.e. educated guessing), and sometimes propitiatory sacrifice. This paper tries to lift the veil by describing work on Lux, a new indexed XQuery search engine built using Saxon and Lucene, which is freely available under an open-source license. Lux optimizes queries by rewriting them as equivalent (but usually faster) indexed queries, so its results are easier for a user to understand than the abstract query plans produced by some optimizers. Lucene-based QName and path indexes prove useful in speeding up XQuery execution by Saxon.

Read the paper · More papers on PaperTik