I tried it with single Context also still it is taking same time as with different context.
Well, this is not about performance. Several context instances may lead to the corruption of your data if you e.g. decide to perform write operations. The JavaDoc may give you some hints [1]. Beside that, the Wiki article on transactions tell you how concurrent operations are handled by BaseX [2].
Queries written in optimized manner.Disk operation is also high taking 10 to 20 mb reading per second.
So this means that all the data you are scanning really needs to be looked at? And that there is no way to benefit from index structures?
Could you please guide me to sharing data between queries.
I’m not sure why you want to do that, or if it would really help. As XQuery is a rather complex language, you’d first need to define what parts of the data are relevant for all queries, etc. Maybe you could give us a minimized query example instead, which shows us what your queries do?
Christian
[1] http://docs.basex.org/javadoc/org/basex/core/Context.html [2] http://docs.basex.org/wiki/Transaction_Management