I'm developing a high load server application using C++ and libpq (libpqxx is very unstable). I use async queries in threads to improve performance. But I've discovered that, for example, PQsendQuery("SELECT 1;SELECT 1;")
works faster then executing PQsendQuery("SELECT 1")
two times.
Is there any way to call bunch prepared of statements or another way to pipeline or use batch mode?
EDITED: Summary: How to get best performance in libpq?