Page 1 of 1

XQuery performance in Berkeley DB vs. Saxon

Posted: Sun Nov 08, 2009 11:25 pm
by Stefan_E
I have two Berkeley DB collections of 1.9GByte each containing approx. 700 and 1400 documents respectively, each (in .xml) of 1.4 (0.7) MByte.

I run an XQuery in Berkeley which start as

Code: Select all

declare variable $set_1:= collection("set_1.dbxml")/TOUCH[PRR/X_COORD=$x and PRR/Y_COORD=$y];
declare variable $set_2:= collection("set_2.dbxml")/TOUCH[PRR/X_COORD=$x and PRR/Y_COORD=$y];
and then operates on $set_1 and $set_2. This takes ~170s.

But when I use Berkeley just to extract two files set_1.xml and set_2.xml, this takes ~6s only (due to indices on X_COORD and Y_COORD). When I then run the same query body with Saxon on the two files set_1.xml and set_2.xml, Saxon returns after ~9s. So, total execution (6+9)=15s compared to 170s in native Berkeley.

(I also run the same from a perl script using Sleepycat::DbXML and gave Berkeley a cache of 64M; performance improved slightly to approx. 140s)
  • Is this performance difference expected
  • ... where does it come from?
Thanks for your help! Stefan

Re: XQuery performance in Berkeley DB vs. Saxon

Posted: Mon Nov 09, 2009 6:15 pm
by stefan
The issue seems to be related with Berkeley DB XML. This question might be better answered at Oracle Berkeley DB XML forum ... 74&start=0