One use case where this might be a problem is when you want all of your
queries compiled at your application start time (using
QueryProcessor::compile()).  This is a speed/CPU load issue.

Please tell me I'm wrong it this is done automagically for modules stored
in the database, but my impression is it doesn't happen until you call
compile or execute (which calls compile).

I'm working in Java and plan to use Apache Commons Pool to store a bunch of
sessions with associated start-time-compiled queries for the threads of my
website requests. Can anyone see any problems with this approach?



On Fri, Apr 12, 2013 at 1:30 AM, Christian Grün
<[email protected]>wrote:

> Hi Michael,
>
> > I didn’t check how the client API works in details, but is it made in
> such a
> > way that only one query at a time can be sent? Should I use a new Session
> > instance for every single query sent to the server?
>
> exactly, that’s the way our sessions work: If you want to run queries
> in parallel, you’ll have to create multiple sessions. In the use cases
> we are familiar with, this works out fine, because creating a new
> session is a pretty light-weight operation.
>
> Hope this helps,
> Christian
> _______________________________________________
> BaseX-Talk mailing list
> [email protected]
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
>
_______________________________________________
BaseX-Talk mailing list
[email protected]
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

Reply via email to