On Mon, 2024-07-15 at 08:24 +0200, Bernhard Liebl wrote:
> 
> for $seq in doc("data.xml")//seq

You could try changing this to
  doc("data.xml")/seqs/seq
so that it doesn't have to look at every item element to see if it's a
seq element. It'll also likely run faster if you load the data into the
database instead of using doc(), as then there will presumably be an
element index.

I also notice the time to compile and optimize the query was longer for
the second run. Maybe the computer was low on memory?

liam


-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org

Reply via email to