[xquery-talk] joining multiple queries into a single one

Jason Hunter jhunter at xquery.com
Tue Apr 11 16:25:11 PDT 2006

Michael Kay wrote:
> Thirdly, the "task" seems to be the outermost element in your document. Use
> /task rather than //task to avoid a search of the whole document. [This
> might not apply to eXist: but it never does any harm to give the system more
> information to narrow the search.]

Actually on an indexed system giving more information to "narrow the 
search" can look to the system like more criteria to worry about.  :)

For example, a query for //foo is simple if you have an index that knows 
the placement of foo elements.  Doing /a/b/c/foo likely requires joining 
between indexes to ensure you only get foo elements in the right locations.


More information about the talk mailing list