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?
Perhaps a query like this would suit you:
SELECT * FROM tablename ORDER BY RANDOM() LIMIT 400;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With