Re: [MarkLogic Dev General] slow query/profiler question

2011-05-12 Thread Evan Lenz
ing a period in front of /yy should help. Your line would become: >> >> let $these_agreements := >>$the_agreements/*[./eoi:jurisdictions/eoi:jurisdiction eq >>$one_jurisdiction_code] >> >> Kind regards, >> Geert >> >> -Oorspronkelijk bericht--

Re: [MarkLogic Dev General] slow query/profiler question

2011-05-07 Thread Michael Blakeley
On 7 May 2011, at 13:18 , Jakob Fix wrote: > Hi Michael, > > thanks for your reply. It made my day! From > 4secs to < 0.4 in less > than two hours! :-) Glad to hear it. > boolean($these_agreements/eoi:enforced/text()) > > In this case, if all eoi:enforced elements are empty this will return >

Re: [MarkLogic Dev General] slow query/profiler question

2011-05-07 Thread Jakob Fix
Hi Michael, thanks for your reply. It made my day! From > 4secs to < 0.4 in less than two hours! :-) On Sat, May 7, 2011 at 18:16, Michael Blakeley wrote: > As far as I am aware there is no optimization of XPath expressions across > variable bindings. So the existing query isn't using indexed

Re: [MarkLogic Dev General] slow query/profiler question

2011-05-07 Thread Michael Blakeley
As far as I am aware there is no optimization of XPath expressions across variable bindings. So the existing query isn't using indexed lookups for much of anything, but is evaluating many many in-memory expressions. The evaluator is traversing the entire document structure of everything in $thes

Re: [MarkLogic Dev General] slow query/profiler question

2011-05-07 Thread Michael Sokolov
You don't say what $one_jurisdiction_code is bound to. Is it a huge sequence? Have you compared with using a literal value there? Probably not this, but every rock deserves a look I guess -Mike On 5/7/2011 11:12 AM, Jakob Fix wrote: > hi, I'm trying to optimize a query that runs several seco

Re: [MarkLogic Dev General] slow query/profiler question

2011-05-07 Thread Jakob Fix
nden: zaterdag 7 mei 2011 17:12 > Aan: General Mark Logic Developer Discussion > Onderwerp: [MarkLogic Dev General] slow query/profiler question > > hi, I'm trying to optimize a query that runs several seconds instead > of subseconds. > the number of documents in the da

Re: [MarkLogic Dev General] slow query/profiler question

2011-05-07 Thread Geert Josten
-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Jakob Fix Verzonden: zaterdag 7 mei 2011 17:12 Aan: General Mark Logic Developer Discussion Onderwerp: [MarkLogic Dev General] slow query/profiler question hi, I'm trying to optimize a query that runs sever

[MarkLogic Dev General] slow query/profiler question

2011-05-07 Thread Jakob Fix
hi, I'm trying to optimize a query that runs several seconds instead of subseconds. the number of documents in the database is very small (~4000), and the documents themselves are in the sub-1K range. running the profiler on the code below shows that an inordinate amount of time is spent in this l