Hi George,

you can't disable parts of the optimizer. I guess to be really able to
help you we will need to see the relevant part of the query and best an

However, if the problem exists in Saxon and BaseX it is quite probably a
problem with your query instead of the optimizers fault. I would be
rather surprised to see that Saxon and BaseX have exactly the same bug.


On 12/01/2016 03:15 PM, George Sofianos wrote:
> Hi,
> I'm having some issues with finding the position of a value in a for
> loop. My query is complex so I can't write it in an example here (at
> least for the moment). I think the XQuery optimizer messes up with it.
> The result I get from the for loop is something like this for every
> return entry:
> <element>2113 - 11953 - 8760</element>
> where 2113 is the stuck $pos, 11953 is the count $count, and 8760 is
> the number of values in the sequence I'm looping on.
> Any Ideas? Can I disable part of the optimizer and see if that is the
> problem ?
> p.s1 I'm already using declare option db:inlinelimit '0'; because I've
> noticed some time ago it helps with compiling the XQuery files
> (without this, I have cases of very slow or freezing compilations).
> p.s2 I've also had issues this with Saxon involving $pos.

Dirk Kirsten, BaseX GmbH, http://basexgmbh.de
|-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
|   Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle
`-- Phone: 0049 7531 91 68 276, Fax: 0049 7531 20 05 22

Reply via email to