[xquery-talk] Xquery update performance question
sjurisic at mrxsolutions.com
Sat Dec 18 17:39:48 PST 2010
this is my first post to this group!
I am using eXist DB and I am stuck with the performance of the following query.
It took 12hours to complete???
Here is the scope:
We have many collections within a collection, something like this:
... etc up to 4000+ subcollections (but less than 10,000)
Now I want to run a query to update some values within all patient.xml
documents, the query looks something like this:
for $p in collection("/db/patients")/p[abc eq "" and def ne ""] return (update
value $p/abc with "test1", update value $p/def with "", update value $p/ghi with
(: etc, up to 4-5 elements to be updated :)
Problem: When I ran this query, it took about 12 hours to finish. Did I do
something wrong here?
PS: If the "update..." portion above is replaced with "return $p", the query ran
very fast, about less than 1 minute; so it looks like the update part is slowing
down.. but why?
More information about the talk