Dear Basex,
We have written a query to read nodes from collection which are in volumes of crores.Sample xml is as attached to this mail.In the xml there are crores of nodes with the tag "R",now i need to fetch all the tags with "R", i have used the below query to fetch it but the amount of time it is taking to do is going above 5 minutes and taking a memory of >1 GB.
for $PSTNCallData in (collection("52_DATA_AUGUST-14_Billed_HugeDataTesting")/SUBCUSTBRK/ITEMIZED/TRANSACTION[data(@Type)=('PSTN')]/CALL_TYPES/DATA/R) return
<R><bill_no>{$PSTNCallData/C1}</bill_no></R>
Could you please help us in optimizing this query.Thank you in advance.
Thanks & Regards
ChandraShekar
The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited.
Hi ChandraShekar,
If your database has up-to-date index structures, try this:
for $PSTNCallData in (collection("52_DATA_AUGUST-14_Billed_HugeDataTesting")/SUBCUSTBRK/ITEMIZED/TRANSACTION[@Type = 'PSTN' ]/CALL_TYPES/DATA/R) return <R><bill_no>{$PSTNCallData/C1}</bill_no></R>
Please give me some feedback if this solves your problems. If not, please send me the query info output.
Best, Christian
basex-talk@mailman.uni-konstanz.de