Interesting -- since the path index already provides a unique, ordered constraint over the set of available paths, it makes perfect sense to use this as the second part of the compound index on attribute values. It will both provide additional discrimination information AND be smaller than storing the symbolic information.
Agreed that the large part of the effort is in the optimizer. I haven't looked at that part of your code yet; I should be able to look at it this week.
On Fri, Nov 4, 2011 at 12:16 AM, Christian Grün christian.gruen@gmail.com wrote:
Just some quick feedback, regarding the extension of index entries: we'd get even better results by extending the index entries with id's to the unique location paths.. e.g.:
<a> <b>dig</b> <c>dig</c> <c>diz</c> </a>
Path Index: 0: a/b 1: a/c
Value Index: dig.0 -> /a/b/text() dig.1 -> /a/c/text()[.='bla'] diz.1 -> /a/c/text()[.='blu']