XQuery performance in Berkeley DB vs. Saxon

Questions about XML that are not covered by the other forums should go here.
Stefan_E
Posts: 18
Joined: Sat Nov 07, 2009 12:03 am

XQuery performance in Berkeley DB vs. Saxon

Post by Stefan_E » Sun Nov 08, 2009 11:25 pm

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

stefan
Posts: 45
Joined: Wed Jan 08, 2003 9:43 am
Contact:

Re: XQuery performance in Berkeley DB vs. Saxon

Post by stefan » Mon Nov 09, 2009 6:15 pm

The issue seems to be related with Berkeley DB XML. This question might be better answered at Oracle Berkeley DB XML forum http://forums.oracle.com/forums/forum.j ... 74&start=0

Post Reply