Hi,
first of all, indexes will not help you in this scenario. Indexes are used to select the requested documents from the set of all documents in a doctype. However, they do not support navigation within a document.
In the current implementation, XQuery update rewrites the complete document (i.e., 6.8M in your case) after the requested modifications have been applied.
Have you tried to do multiple update operations in one XQuery statement? For example:
for $a in input()/Notebook
do ( insert attribute test {“value”} into $a/div/i[@xid=“110”]
insert attribute test {“value”} into $a/…
…
)
This should have the same execution time as a single insert.
Hope this helps,
Best regards,
Manfred Michels
#Tamino#webMethods#API-Management