Have you tried Max's suggestion of adding the xml data to a BaseX db first? Based on this:
for $details in
(collection("E:\Web-Projects\VodafoneUK\Docs\Cloud_Test_Stats\Performance_Analysis\Freq_Called_Sample_XML_Data.xml")
it looks like you're using the file Freq_Called_Sample_XML_Data.xml directly from the filesystem, which means it has no indexes and must be fully scanned to get results. You should create a DB and upload that xml file with TEXTINDEX and ATTRINDEX enabled (which is the default). You might need to run the OPTIMIZE ALL command after uploading the xml file, you can run the INFO DB command and it will show if your database has up-to-date indexes or not. Once you have a db, you can also use the GUI to check the query plan that's being used for a particular query.
Martín.
Date: Fri, 11 Sep 2015 18:37:05 +0530
From: adibabu.b@gmail.com
To: mgaerber@arcor.de
CC: basex-talk@mailman.uni-konstanz.de
Subject: Re: [basex-talk] Fwd: Re : Basex Query Optimization Support
Dear Max,
Currently I am using collection only(size 7.96 GB), I am sharing the query for your reference only. I tried the latest version 8.2.3 also but it takes more time than 7.9.
Can you please assist me to proceed further.
Thanks & Regards,
Adi