[MarkLogic Dev General] SVC:EXTIME -- Time limit exceeded

Will Thompson wthompson at jonesmcclure.com
Mon Mar 12 11:19:00 PDT 2012


Jaspreet,

"Unsearchable" according to xdmp:plan just means that it is not an inline fully searchable path expression. MarkLogic elaborates on this in the docs. It doesn't mean that your cts:element-values() call isn't working correctly, just that it's not a valid expression for cts:search.

Regarding performance, you could try xdmp:query-meters() as Jon lays out in his blog post and see what is happening under the hood of your database.

-Will


From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of JASPREET SINGH
Sent: Monday, March 12, 2012 4:09 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] SVC:EXTIME -- Time limit exceeded


Hi Damon,

I ran the profiler on cq for the following query which was taking time and I passed the hard-coded values where required.

let $options := ("document","collation=http://marklogic.com/collation/","frequency-order")






let $base-query := cts:directory-query("/content/", "infinity")
let $values := cts:element-values(fn:QName("http://www.xyz.com/app/meta","Country"), "", $options, $base-query)






return fn:count($values)


According to profiler,

cts:element-values(fn:QName("http://www.xyz.com/app/meta","Country"), "", $options, $base-query) has the maximum shallow-%.






Then I ran xdmp:plan() on the same statement :-

cts:element-values(fn:QName("http://www.xyz.com/app/meta","Country"), "", $options, $base-query)






and I got the following result :-

<qry:query-plan xmlns:qry="http://marklogic.com/cts/query">

  <qry:error-trace><error:error xmlns:error="http://marklogic.com/xdmp/error" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <error:code>XDMP-UNSEARCHABLE</error:code>

      <error:name/>

      <error:xquery-version>0.9-ml</error:xquery-version>

      <error:message>Expression is unsearchable</error:message>

      <error:format-string>XDMP-UNSEARCHABLE: xdmp:plan(cts:element-values(fn:expanded-QName("http://www.xyz.com/app/meta", "Country"), "", ("document", "collation=http://marklogic.com/collation/", "frequency-order"), cts:directory-query("/content/", "infinity"))) -- Expression is unsearchable</error:format-string>

      <error:retryable>false</error:retryable>

      <error:expr>xdmp:plan(cts:element-values(fn:expanded-QName("http://www.xyz.com/app/meta", "Country"), "", ("document", "collation=http://marklogic.com/collation/", "frequency-order"), cts:directory-query("/content/", "infinity")))</error:expr>

      <error:data/>

      <error:stack>

               <error:frame>

                 <error:line>4</error:line>

                 <error:operation>xdmp:eval("let $options := (&amp;quot;document&amp;quot;,&amp;quot;collation=http://mar.<http://mar./>..", (), &lt;options xmlns="xdmp:eval"&gt;&lt;database&gt;12438542817496803555&lt;/database&gt;&lt;default-xquery-version...&lt;/options&gt;)</error:operation>

                 <error:variables>

                   <error:variable>

                     <error:name xmlns="">options</error:name>

                     <error:value>("document", "collation=http://marklogic.com/collation/", "frequency-order")</error:value>

                   </error:variable>

                   <error:variable>

                     <error:name xmlns="">base-query</error:name>

                     <error:value>cts:directory-query("/content/", "infinity")</error:value>

                   </error:variable>

                 </error:variables>

                 <error:xquery-version>0.9-ml</error:xquery-version>

               </error:frame>

               <error:frame>

                 <error:uri>/eval.xqy</error:uri>

                 <error:line>115</error:line>

                 <error:xquery-version>1.0-ml</error:xquery-version>

               </error:frame>

      </error:stack>

    </error:error></qry:error-trace>

</qry:query-plan>


What setting should i do in database to fasten the query?

Note :- element-range-index is set for the 'Country' element.

Thanks and Regards,
Jaspreet
On Sun, Mar 11, 2012 at 2:45 AM, Jonathan Cook - FM&T <Jonathan.Cook2 at bbc.co.uk<mailto:Jonathan.Cook2 at bbc.co.uk>> wrote:

I've written up a blog post on how to profile your code and the steps I went through.
http://joncook.github.com/blog/2012/02/12/evaluating-mark-logic-xquery-performance/

Jon



-----Original Message-----
From: general-bounces at developer.marklogic.com<mailto:general-bounces at developer.marklogic.com> on behalf of Michael Blakeley
Sent: Tue 28.02.2012 05:47
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] SVC:EXTIME -- Time limit exceeded

First, profile your code to figure out which bit is taking so long. Then rewrite it so it's faster. Repeat until you are happy with performance.

If you post code and profiler output here, you might get some suggestions.

-- Mike

On 27 Feb 2012, at 21:28 , JASPREET SINGH wrote:

> Hi,
>
> I am getting an error SVC:EXTIME -- Time limit exceeded error during search. We have a .NET application that sends request to XDBC server of MarkLogic. We have set the request time out limit as 30 secs which we have to keep anyhow for fast performance.
> But when we search millions of documents inside MarkLogic server, we get the above mentioned error.
>
> What would be the best way to resolve this error? What server settings we should make to optimize our search results?
>
> Thanks and Regards,
> Jaspreet Singh
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com<mailto:General at developer.marklogic.com>
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General at developer.marklogic.com<mailto:General at developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General at developer.marklogic.com<mailto:General at developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120312/50e1de9a/attachment-0001.html 


More information about the General mailing list