In Addition of Asit response, You should go with cts:element-values() and you should create cts:and-query and inside it cts:range-query for the dates and flag.
Create range index for lab_report, report_date and delete_flag. Let me know if you want any help in creating query. Regards, Indy On Wed, Jul 1, 2015 at 10:45 AM, Asit Nautiyal <[email protected]> wrote: > Hi Zise, > > By observing below code, it will hit performance for sure and that's why > your are getting XDMP-EXPNTREECACHEFULL error. > To avoid XDMP-EXPNTREECACHEFULL error you have to tune your code. Use > cts:queries (like range queries and others) to get your result first and > then you can use count. > > Please go through the below link : > > https://docs.marklogic.com/guide/performance > > > Regards, > Asit Nautiyal > ------------------------------ > Date: Wed, 1 Jul 2015 10:11:01 +0800 > From: [email protected] > To: [email protected] > Subject: [MarkLogic Dev General] XDMP-EXPNTREECACHEFULL error > > > when i execute the following xquery , marklogic throw an > XDMP-EXPNTREECACHEFULL error: > count(for $i in collection('test')/patient/link/visit/lab_report > where $i /@report_date >= '2010-09-25T00:00:00.000' and $i/@ report_date > <= '2014-09-25T00:00:00.000' and $i/@delete_flag = '0' > return $i) > > I can not increase size of expanded tree cache, so what i can do to avoid > the XDMP-EXPNTREECACHEFULL error while the query resturn the very large > results > > > > _______________________________________________ General mailing list > [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 > >
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
