From: <MI...@os...> - 2005-12-02 11:21:40
|
Hi all! My application stores records in following xml <root> <instance date="" country="AM" ip="127.0.0.1" anket="a1.1" model="model-1"> <question id="q_1"> <value id="a_1"/> </question> <question id="q_2">NO_VALUE</question> <question id="q_3"> <value id="a_2"/> </question> .... </instance> ...... <instance> ..... </instance> </root> A have about 18 500 <instance> elements Each <instance> contains from 12-16 <question> elements with from 1-4 <value>. Total size of the file is about 17 MB. I need to count questions, values by questions that satisfies filter on question values I use following XQuery count(collection('path_to_file')/root/instance/question[@id='question_id']) to count without filter and count(collection('path_to_file')/root/instance[question[@id='q_3']/value/@id='a_1' and ... some other conditions]/question[@id='question_id']) to count with filter Also I need to count stat. of values by questions (also with filter). query without filter executes about from 1 to 3 minutes!!! and query with filter fails with OutOfMemoryError on my Celeron 1000 Mhz with 256Mb RAM I use Exist version: 1.0b2 build: 20041107 How to optimize queries or maybe twike eXist to make it possible to execute counts with filters in my case? Pleese help! Will current snapshot solve the problem? -- mailto:MI...@os... |