Hi All,

I'm experiencing problems when processing long sequences. E.g. there is one XML 
file which has following structure:

items.xml
---------

<root>
        <item id="/data/store001/location001/"/>
        <item id="/data/store001/location012/"/>
        <item id="/data/store003/location006/"/>
        .
        .
        .
        <item id="/data/store115/location322/"/>
</root>

Where fn:count(//item) = 15,000. For each of them I must perform a simple 
operation involving xdmp:directory(@id, "1") call. Say, some node check. So, 
what I do next is I write two XQuery queries using xdmp:invoke() method.

main.xqy
--------

let $items := fn:doc("/items.xml")
return
        <results>
        {
                for $i in $items//item
                return
            try {
                        xdmp:invoke("/analyze.xqy", (xs:QName("item"), 
fn:string($item)),
                                        <options xmlns="xdmp:eval">
                                                
<isolation>different-transaction</isolation>
                                                
<prevent-deadlocks>true</prevent-deadlocks>
                                        </options>
                        )
            }
            catch ($ex) {
                        $ex
            }
    }
    </results>

analyze.xqy does some xdmp:directory() stuff for each item. It takes approx. 
400s or something for this script set to perform the task, which is a good 
result. Cool.

BUT - when I tried to go through the larger list which included 2,000,000 
items, I even failed to upload it via WebDAV. After cutting into pieces each of 
100,000 items, I managed to upload them but then failed to get the results. 
After two hours of waiting ML threw an exception saying that the timeout limit 
was exceeded.

I would be very thankful if someone could help me out with this or give me some 
advice.

Thanks,
Van
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to