If you have a range index defined for this (and you definitely should for this kind of operation) and you're running on 6 or later, try to use cts:sum-aggregate instead of cts:sum.
-m On Oct 23, 2012, at 10:20 PM, Abhishek53 S <[email protected]<mailto:[email protected]>> wrote: 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]<mailto:[email protected]> Website: http://www.tcs.com<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]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
