Hi Ron,
Adding another opinion the board (I meant to write this already on Saturday) ;-)
I don’t think there is much to optimize w.r.t. to the XQuery update solution, as your whole database will be held in memory during the update…
YET: if you do not care for the namespaces you could still strip them when creating your database:
```
db:create(
'mydb-no-ns',
'<xml xmlns="foo"><_></_></xml>',
'mydoc2.xml',
map {"stripns": "yes"}
)```
=> • parsing options will only impact string input (URIs, XML strings), because nodes have already been parsed.
Maybe this helps, I am not sure if someone already mentioned it!
Best
Michael
I can go with the default namespace declaration so no followup is needed, unless you are curious and have the time to investigate.