Hi Shruti,

If you want to expose a UI in which an end user can navigate through all 30k 
values, I’d suggest applying pagination. You could have a look at the 
/v1/values REST api endpoint, but I don’t expect it to be faster, or not much. 
In the end you have to serialize a large number of values, even the mere 
transfer over HTTP can be substantial..

Cheers,
Geert

From: shruti kapoor 
<[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Sunday, July 5, 2015 at 7:54 PM
To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Subject: Re: [MarkLogic Dev General] Reduce the query execution time for 
cts:value-tuples


Hi Geert,

I need all 30k results and since the response is in json array, I convert it 
into a map first then each map goes through some data enrichment to finally 
generate an html table.
Could I useany other search api ?

Thanks
Shruti

On 6 Jul 2015 01:50, "Geert Josten" 
<[email protected]<mailto:[email protected]>> wrote:
Hi Shruti,

I think that you will find that if you wrap the cts:value-tuples in a count 
that it will run much faster, maybe even in sub-sec. Most time is consumed by 
serializing 30k json arrays. Do you really need all 30k items, or would top 20 
be sufficient?

Cheers,
Geert

From: shruti kapoor 
<[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Sunday, July 5, 2015 at 11:22 AM
To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Subject: [MarkLogic Dev General] Reduce the query execution time for 
cts:value-tuples


Hi,

I have a cts:value-tuples() query which fetches the json array result. The 
query runs on aprroximately 3lac xmls and the result set contains about 30k 
elements in json array.
It takes about 48sec to run this query.

Is there a way to reduce its execution time.

I have used range indexes for references and even enabled "concurrent".

--

Regards,
Shruti Kapoor

_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to