determine index use in xquery:eval
Wednesday, 24 October 2018 · 3 messages
JE
Johannes Echterhoff24 Oct 2018 15:02 #
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,
JohannesCG
Christian Grün24 Oct 2018 15:21 #
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,
ChristianQuoted text · Johannes Echterhoff · 10 lines
On Wed, Oct 24, 2018 at 3:02 PM Johannes Echterhoff <echterhoff at 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
JE
Johannes Echterhoff24 Oct 2018 15:42 #
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
Quoted text · Christian Grün · 20 lines
-----Ursprüngliche Nachricht----- Von: Christian Grün [mailto:christian.gruen at gmail.com] Gesendet: Mittwoch, 24. Oktober 2018 15:22 An: Johannes Echterhoff <echterhoff at interactive-instruments.de> Cc: BaseX <basex-talk at 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 at 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
Written for BaseX 9.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery