update xquery takes a long long time

hello all,

i am working with tamino 4.2.1 and a collection of 270,000 documents.

It takes approximately 500 sec. to perfom a xquery update like :

declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction
update for $q in input()/TEI.2/teiHeader
let $id := tf:getInoId($q)
where $id=(145365)
do (
replace $q/fileDesc/titleStmt/title/text() with tf:createTextNode(“malina”)
replace $q/fileDesc/sourceDesc[@id=“orig”]/biblFull/title/text() with tf:createTextNode(“malina”)
replace $q/fileDesc/sourceDesc[@id=“orig”]/biblFull/titleStmt/title[@level=“a”]/text() with tf:createTextNode(“malina”)
)

Is it an inefficient query ? What can i do to improve it ? Or to improve the tamino response time (i have already won 3 sec in changing the “XQuery document cache size” in my database properties but i’m not sure it’s really an improvement…) ?

thnaks in advance
thomas

EDIT :
The update is much quicker (approx. 1 sec) when replacing only one element (even with the relative // xpath) :

declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction
update for $q in input()/TEI.2/teiHeader
let $id := tf:getInoId($q)
where $id=(145365)
do (
replace $q//titleStmt/author/text() with tf:createTextNode(“Bachmann, Ingeborg”)
insert Mon Feb 26 17:50:35 CET 2007Tamino Java Client
mod feld : //titleStmt/author -


into $q/revisionDesc
)

What is so different between the two queries ?

hello all,

i still have this problem of not knowing why the update of many elements when giving every absolute xpathes is some much longer (approx. 500 times) than giving only one xpath that “wraps” them all.
Moreover, this “wrapping” workaround is only useful when i want to update several elements that are named the same (that happens in TEI documents) but not at all when i want to update, for example, one title and one author element on the same document.

Does anyone has a lead on this ?
Thanks in advance,

Thomas