Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

How to avoid parallel select-statements in the same sesssion

edited July 2 in General Discussion


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.


  • 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:

                 _mutex = new Mutex();
                _command.CommandText = "SELECT * FROM " + table;
                VerticaDataReader reader = _command.ExecuteReader();
  • Jim_KnicelyJim_Knicely Administrator

    @joergschaber - Thanks for the update!

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.