I am writing a CUDA code which requires data from database I want to get 400 random rows from a database stored in PostgreSQL. If I retrieve each of the rows sequentially, it will make my code very slow and it will not serve the purpose of parallelism and speedup. So, I want some C library or function which can create multiple connections with PostgreSQL and retrieve data faster.
Is there something in C which will help me do that?
libpq(postgresql.org/docs/9.1/static/libpq.html ) and opening multiple nonblocking connections withPQconnectStart()?