From: Adam R. <ada...@de...> - 2007-02-21 13:09:54
|
If your running out of Memory you need to increase the memory limit for = eXist, this is typically in startup.sh or server.sh depending on how you = start eXist and is the -Xmx setting. eXist ships configured to use 128MB = max, which is very conservative! After changing that value, you will = need to retstart eXist. Optimisation ideas to try - 1) Try using the full path in both the xquery and the collection.xconf = (dont forget to reindex after changing the collection.xconf!!!) So - //billingData becomes /billingData //count becomes /billingData/countInfo/searchData/count 2) You could establish a QName index on /billingData/@jobNum, these = QName indexes are very very fast. Take a look here - = http://wiki.exist-db.org/space/jmvanel/New+index+by+QName -----Original Message----- From: Dhawan, Vikram (LNG-DAY) [mailto:vik...@le...] Sent: Tue 20/02/2007 18:44 To: Adam Retter Subject: RE: [Exist-open] How can i add user defined Xquery = functioninfunction library =20 Hey Adam, Here is the typical XML document i have around 20,000 of these in exist for my test, in individual customer collections in a main collection called Billing; .xconf file and query I am running: XML Document: <billingData jobnum=3D"1234" custid=3D"100"> <jobInfo> <dateCreated>2002-02-14T14:48:02.000-0500</dateCreated> <modifier>KING</modifier> <customerName>Joes Pizza</customerName> <billGroup id=3D"00001">1137XY</billGroup> <inputFileName>xq.txt</inputFileName> <finalDateTime>2002-02-27T17:00:00.000-0500</finalDateTime> </jobInfo> <countInfo> <searchData prodid=3D"9998" procid=3D"9987"> <productName>Product1</productName> <processName>All</processName> <count id=3D"10001"> <billableEntity id=3D"264">Hello World</billableEntity> <billable>true</billable> <allProcess>true</allProcess> <inputCount>1000</inputCount> <billableCount>1000</billableCount> <nonVariablePrice>0.0</nonVariablePrice> <finalNonVariablePrice>0.0</finalNonVariablePrice> <finalVariablePrice>0.0</finalVariablePrice> <finalTotalPrice>0.0</finalTotalPrice> <billGroupOverRideID>0</billGroupOverRideID> </count> </searchData> <searchData prodid=3D"9999" procid=3D"555"> <productName>Product1</productName> <processName>All1</processName> <count id=3D"10000"> <billableEntity id=3D"265">Hello World</billableEntity> <billable>true</billable> <allProcess>false</allProcess> <inputCount>1000</inputCount> <billableCount>1000</billableCount> <nonVariablePrice>0.0</nonVariablePrice> <finalNonVariablePrice>0.0</finalNonVariablePrice> <finalVariablePrice>0.0</finalVariablePrice> <finalTotalPrice>0.0</finalTotalPrice> <billGroupOverRideID>0</billGroupOverRideID> </count> </searchData> <searchData prodid=3D"99997" procid=3D"999"> <productName>Product1</productName> <processName>Proc1</processName> <count id=3D"100001"> <billableEntity id=3D"266">Hello World</billableEntity> <billable>true</billable> <allProcess>false</allProcess> <inputCount>1000</inputCount> <billableCount>1000</billableCount> <nonVariablePrice>0.0</nonVariablePrice> <finalNonVariablePrice>0.0</finalNonVariablePrice> <finalVariablePrice>0.0</finalVariablePrice> <finalTotalPrice>0.0</finalTotalPrice> <billGroupOverRideID>0</billGroupOverRideID> </count> </searchData> </countInfo> </billingData> Index: <collection xmlns=3D"http://exist-db.org/collection-config/1.0"> <index> <fulltext> <include path=3D"//billingData"/> </fulltext> <create path=3D"//billingData/@jobnum" type=3D"xs:integer"/> <create path=3D"//billingData/@custid" type=3D"xs:integer"/> <create path=3D"//billingData/countInfo/searchData/count/@id" type=3D"xs:integer"/> </index> </collection> Query: collection("Billing")//billingData[@jobnum =3D 516] ---- this query = takes around 20 Secs to come back. collection("Billing")//count[@id =3D 3872] --- This query throws Java OutOfMemoryException.=20 collection("Billing")//billingData/countInfo/searchData/count[@id =3D 3870] Throws Java OutOfMemoryException. Please let me know know. I will also appreciate if you can give me the link of latest SVN work. Vik -----Original Message----- From: Adam Retter [mailto:ada...@de...]=20 Sent: Tuesday, February 20, 2007 1:11 PM To: Dhawan, Vikram (LNG-DAY) Cc: exi...@li... Subject: RE: [Exist-open] How can i add user defined Xquery functioninfunction library Can you give us a snippet of your xquery and your xml and describe what your query should return, we can then look at optimising these, also the new optimised indexed work in the current SVN may be of interest to you - check the mailing list. Thanks Adam. <snip/> --=20 Adam Retter Principal Developer Devon Portal Project Room 310 County Hall Topsham Road Exeter EX2 4QD t: 01392 38 3683 f: 01392 38 2966 e: ada...@de... w: www.devonline.gov.uk |