Hi Christian, The tip regarding xquery:invoke was very useful. Looks like no indexes are applied. I'll have to investigate in more detail. Thank you for responding so quickly, Johannes
-----Ursprüngliche Nachricht----- Von: Christian Grün [mailto:christian.gruen@gmail.com] Gesendet: Mittwoch, 24. Oktober 2018 15:22 An: Johannes Echterhoff echterhoff@interactive-instruments.de Cc: BaseX basex-talk@mailman.uni-konstanz.de Betreff: Re: [basex-talk] determine index use in xquery:eval
Hi Johannes,
As a single query may yield a large number of query plans if xquery:eval is repeatedly invoked, and as all of these plans will be created at runtime, we haven’t included the plans in the query optimization.
However, if a query utilizes the index if it is run standalone, the index will also be used if xquery:eval is run, so you should be able to check some of your queries in advance. If your dynamic queries do not change, a good alternative is to use xquery:invoke; this might simplify your tests.
Best, Christian
On Wed, Oct 24, 2018 at 3:02 PM Johannes Echterhoff echterhoff@interactive-instruments.de wrote:
Hello,
Is there a way to determine if the query that is executed by xquery:eval(…) makes use of index information? Can we somehow obtain the optimized plan for that query?
Best regards,
Johannes