Hi Abishek,
It is not unusual for MarkLogic to respond slower the first time, as it is trying to put intermediate results in cache to speed up subsequent calls. But it could also indicate that your approach isn’t as efficient as you might think. Not sure how many valuation values there are for a single id, but you are retrieving them all. If there are many, that slows down. Also, you are calculating separate sum’s for each project id. It should be possible to pass in all id’s at once to the element-value-query, and get a sum of the valuation values of all those projects at once. But perhaps you just want separate sums. In that case: do you need 500 at once? Pagination might help.. Kind regards, Geert *Van:* [email protected] [mailto: [email protected]] *Namens *Abhishek53 S *Verzonden:* woensdag 24 oktober 2012 7:21 *Aan:* MarkLogic Developer Discussion *Onderwerp:* [MarkLogic Dev General] Performance Overhead - cts:sum Hi All, I am having performance penalty (Average time 23-30 Sec for the first time and less than 1 sec for next onward hit[which is accecpted]) with cts:sum over one of the element stores valuation information ----------------------------------------------------------------------- *for* $id *in* (1 to 500) return cts:sum(cts:element-values( xs:QName("valuation"), (), (), cts:and-query(( cts:element-value-query(xs:QName("id"),$ id), cts:collection-query("/project") )) ) ) Do we have any different way to over come performance overhead. Thanks Abhishek Srivastav I T Analyst Tata Consultancy Services Cell:- +91-9883389968 Mailto: [email protected] Website: http://www.tcs.com ____________________________________________ Experience certainty. IT Services Business Solutions Outsourcing ____________________________________________ =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
