[xquery-talk] Xquery update performance question
Sava Jurisic
sjurisic at mrxsolutions.com
Sat Dec 18 17:39:48 PST 2010
Hi All,
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:
/db/patients/1/patient.xml
/db/patients/2/patient.xml
... etc up to 4000+ subcollections (but less than 10,000)
/db/patients/4003/patient.xml
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
"test2")
(: 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?
Many thanks,
Sava
More information about the talk
mailing list