[xquery-talk] xquery with large xml file

Michael Kay mhk at mhk.me.uk
Thu Apr 13 17:40:29 PDT 2006


> In our testing, most XQuery products start to suffer with XML files 
> bigger than about 20 Meg unless they implement document 
> projection and streaming. 

It depends on available memory. I know of Saxon users who've gone up to
200Mb without using the streaming facilities (which are XSLT-only at
present). For a query like this one that touches every node once,
performance scales linearly, until you hit your memory limit at which point
it goes exponential. With Saxon that limit is typically at around 5x
document size, but of course the precise point at which you hit the wall
varies.

(A couple of releases ago, however, this particular query would have run
really badly on Saxon even on 10Mb: if you located a node via the descendant
axis then the cost of finding its parent was proportional to the number of
siblings, which in "data-oriented" XML can be arbitrarily high).

Michael Kay
http://www.saxonica.com/




More information about the talk mailing list