Hi Kunal,
thanks for giving more details.
later one takes 13 secs to complete while former was taking 21 secs.
Former Query : "transaction/* except (/transaction/traInfo)" Loop (executed with java api) takes 18-19 seconds
Later Query (suggested by you) "transaction/*[name() ne 'traInfo']" Loop (executed with java api) takes 0.5 secs
This is still sth. I don't quite get: does the second query take 0.5 or 13 seconds?
Query will return around 94 lacks items.
So there are 94 child element that are not named "traInfo", but "lacks"? Two more questions.. What's the total number of child nodes (try count(/transaction/*)?
So, I was wondering apart from query change, is there any baseX tuning or configuration changes should I do to further improve time from 13 secs.
The query profiling results suggest that some additional time is spent for checking namespaces. Maybe the following query is slightly faster:
transaction/*[local-name() ne 'traInfo']
The remaining information indicates that most time is spent for sequentially parsing the document. If you work with the client/server architecture, you might experience beneficial caching effects.
Hope this helps, Christian