You'll notice the time of xdmp:query-meters() is 1 millisecond.  It's pretty 
fast already.  :)

The time of cts:uri-match("*") is 0 milliseconds.  Amazing, right?  That's 
because MarkLogic is intelligently "lazy" and didn't actually do the work 
because you never checked the results.

Change it to count(cts:uri-match("*")) to force it to execute, and then you'll 
get more interesting timing data.  (BTW, you can use cts:uris() if you really 
want to match all.)


On Oct 11, 2016, at 16:02, sweet frd 
<<>> wrote:


In my xquery, i have used the xdmp:query-meters and it seems that line has 
taken more time to process than any other line while doing profile.

Example :
Query : cts:uri-match("*"), xdmp:query-meters()
PFA for profile result.

The shallow and deep time is more for the xdmp:query-meters(). How to avoid 
this and is there any other way i can get the same functionality of 
xdmp:query-meters() which will take less time?

Also, can anyone explain when and why we go for xdmp:query-meters with a simple 
General mailing list<>
Manage your subscription at:

General mailing list
Manage your subscription at:

Reply via email to