Hi,

BaseX 10 has a different behavior in memory footprint for the following situation.

To avoid passing around data you can create db using the following create (i did this with BaseX 9) declare variable $input := <root><sheet name="SAP">{for $idx in (1 to 10000) return <row>{for $e in $enames return element {$e} { attribute {"content"} {$idx}}}</row>}</sheet></root>;

db:create("test-db",$input,"test.xml")

Then using the following query on the created db:

declare variable $input := db:open("test-db");
<root>{

for $s in $input//sheet[./@name => contains("SAP")]
return
<sheet>{$s/@*}{
    for $r in $s//row
    let $no := $r/Objektkurztext/@content
   return
<row>{$r/@*}{($r/*,<partno>{$no}</partno>)}</row>
}</sheet>
}</root>

Using BaseX 9 the used memory for the query is round about 2 GB which is ok. Using BaseX 10 Out-of-Memory exception happens in my case used memory is > 12 GB
Any thoughts what the reason is - any additional information required?

Alex

Reply via email to