Hi Constantine,
The XPath I showed was just a simple example of using the preceding-sibling axis.
I guessed so already.. Thanks for persisting ;)
I guess what I am asking is ... while most XPath queries I run are quick to resolve, anything using preceding::, preceding-sibling:: or following::, following-sibling:: essentially runs too slowly to be workable - at least, on my sample dataset with about 100K sibling children of the root element.
So is this any sort of known issue? Should I be looking at any sort of configuration options? Is there any way to profile the execution of the Xpath?
It's true that BaseX is mostly optimized for descendant and ancestor operations. In particular, the preceding/preceding-sibling axes will always be slower, as our storage does not contain backward pointers to preceding nodes. I'm pretty sure, though, that there are ways to either optimize relevant queries or the internal optimizer strategies, but we'll probably have to spend some more time on analyzing the relevant bottlenecks..
Feel free to ask for more, Christian