Hi,
I have several xml document index keeping products features and have one master index file of products.. Currently, we have about 25 million products that have size about 25G xquery index size.
My xquery application is reading features data from auxiliary xml document and enhancing master document.
In order to do it, I am inserting data into master document with a generic insert command:
insert node <FEATURES_NODE> into <PRODUCT_NODE>
But xquery update is executing update process after all insert requests collected. But with huge size of my index, the memory of machine (35G) is exhausted easily and can NOT finish process.
Is there way to execute individual xquery update requests one by one so that process can finish?
Erol Akarsu
Hi Erol,
I have several xml document index keeping products features and have one master index file of products.. Currently, we have about 25 million products that have size about 25G xquery index size.
One solution is to generate a BaseX command script, which contains multiple subsequent update operations. It can e.g. be created as follows:
let $records := count(db:open('db')//product-node) let $commands := for tumbling window $w in (1 to $records) start at $s when true() only end at $e when $e - $s = 999999 return 'for $product-node in //product-node' || '[position() = ' || $s || ' to ' || $e || '] ' || 'return insert node <a/> into $product-node' return file:write-text-lines('script.bxs', $commands)
..and run via "basex script.bxs".
Hope this helps, Christian
My xquery application is reading features data from auxiliary xml document and enhancing master document.
In order to do it, I am inserting data into master document with a generic insert command:
insert node <FEATURES_NODE> into <PRODUCT_NODE>
But xquery update is executing update process after all insert requests collected. But with huge size of my index, the memory of machine (35G) is exhausted easily and can NOT finish process.
Is there way to execute individual xquery update requests one by one so that process can finish?
Erol Akarsu
Thanks Christian
That was I what I was thinking Hopefully, it will resolve the issue,
Erol Akarsu
On Tue, Jan 6, 2015 at 4:22 AM, Christian Grün christian.gruen@gmail.com wrote:
Hi Erol,
I have several xml document index keeping products features and have one master index file of products.. Currently, we have about 25 million
products
that have size about 25G xquery index size.
One solution is to generate a BaseX command script, which contains multiple subsequent update operations. It can e.g. be created as follows:
let $records := count(db:open('db')//product-node) let $commands := for tumbling window $w in (1 to $records) start at $s when true() only end at $e when $e - $s = 999999 return 'for $product-node in //product-node' || '[position() = ' || $s || ' to ' || $e || '] ' || 'return insert node <a/> into $product-node' return file:write-text-lines('script.bxs', $commands)
..and run via "basex script.bxs".
Hope this helps, Christian
My xquery application is reading features data from auxiliary xml
document
and enhancing master document.
In order to do it, I am inserting data into master document with a
generic
insert command:
insert node <FEATURES_NODE> into <PRODUCT_NODE>
But xquery update is executing update process after all insert requests collected. But with huge size of my index, the memory of machine (35G) is exhausted easily and can NOT finish process.
Is there way to execute individual xquery update requests one by one so
that
process can finish?
Erol Akarsu
basex-talk@mailman.uni-konstanz.de