Hi,

That's great , thank you very much
 Appreciate your prompt response. Hoping caching functionality will be added in the next release.

In my queries  I am also including a module function library in each of my xqueries, 
so is there a way I can directly set the compiled module function library for all the QueryProcessor instance ,instead of adding library
every time instance gets created. 


Thanks
Anky

On 23 January 2015 at 16:13, Christian Grün <christian.gruen@gmail.com> wrote:
Hi Ankit,

> I was exploring BaseX for my XML based product. I was wondering whether
> there is Prepared Statement Like facility incorporated in BaseX,
>
> With the same QueryProcessor instance, is it possible to execute it multiple
> times with different binding values for given variable.

We are working on caching precompiled XQuery expressions; for now, you
need to create new QueryProcessor instances. In practice, however,
this rarely leads to problems, because QueryProcessor instances are
very light-weight. The following BaseX call creates 100,000 instances
of the QueryProcessor, it takes around 2 seconds:

> basex -V -r100000 "1"

Parsing: 0.01 ms (avg)
Compiling: 0.0 ms (avg)
Evaluating: 0.0 ms (avg)
Printing: 0.01 ms (avg)
Total Time: 0.02 ms (avg)

Obviously, the query "1" is very simple, but usually, parsing only
gets relevant if the queries to be parsed take many KBs or even MBs
(such as can be the case in RESTXQ applications).

Best,
Christian