Hi.
HiI am trying to add some attribute into my data, doing it this way:for $msg in //MSGlet $evi := $msg//TMCE/EVI[1]let $updclass := $evi/@updateclasslet $tmcloc := $msg//MLOC/TMCL[1]let $dir := $tmcloc/@directionlet $loccode := $tmcloc/@primarycodelet $alertc-id := concat($loccode, $dir, $updclass)returninsert node (attribute alertc-id {$alertc-id}) into $msgIf I simply return result similar to this, using following query:for $msg in //MSGlet $evi := $msg//TMCE/EVI[1]let $updclass := $evi/@updateclasslet $tmcloc := $msg//MLOC/TMCL[1]let $dir := $tmcloc/@directionlet $loccode := $tmcloc/@primarycodelet $alertc-id := concat($loccode, $dir, $updclass)return element enhancedmsg {attribute alertc-id {$alertc-id}, $msg}it takes just 27 sWith the insert node, it takes for ever, I had to cancel the query after 90 minutes.I wonder, if there is any relation between this long execution time and possible inefficiency with automatic index update (but I am not aware of what is current status of this approach).Currently, I see, it would be much more efficient to output the result as files, and then import them back, as importing the data I am working on took just 2 minutes.Attached are few sample xml files in the format, I use in my database. Real database consists of 129097 MSG elements and number of DOC elements and documents is exactly the same.With best regardsJanIng. Jan Vlčinský
CAD programy
Slunečnicová 338/3, 734 01 Karviná Ráj, Czech Republic
tel: +420-597 602 024; mob: +420-608 979 040
skype: janvlcinsky; GoogleTalk: jan.vlcinsky@gmail.com
http://cz.linkedin.com/in/vlcinsky