Greetings,
* Samuel Williams (space.ship.traveller@gmail.com) wrote:
> Here is a short example:
>
> https://gist.github.com/ioquatix/2f08f78699418f65971035785c80cf18
>
> It makes 10 queries in one "PQsendQuery" and sets single row mode. But
> all the results come back at once as shown by the timestamps.
If you have 10 queries that you want to make in a given transaction and
you care about the latency then really the best option is to wrap that
all in a single pl/pgsql function on the server side and make one call.
> Next I'm planning to investigate streaming large recordsets to see if
> it works better/incrementally.
If you want to stream large data sets to/from PG, you should consider
using COPY.
Thanks,
Stephen