How to avoid parallel select-statements in the same sesssion
joergschaber
Vertica Customer ✭
Hi,
sometimes , we encounter Vertica errors when executing parallel select-queries in the same session. Parallel queries occur, because we use async methods in our C# application using the ADONET64 vertica driver.
Do you have a hint how to best avoid such parallel queries in the same session? Or do we have another problem here?
We use vertica and driver version is v10.0.1-6.
best,
Jörg
0
Comments
Vertica, at least as of now, is built so that you can only have one query running per session. Each connection handle can prepare, describe and execute exactly one statement handle. I also write client programs (in good old ANSI C in my case) - but, if I need several queries, nested or in parallel, to perform a task, each thread controlling a query acquires its own connection to Vertica. It always served my purpose ...
We solved the problem by using a mutex, like this:
@joergschaber - Thanks for the update!