Re: libpq pipelineing - Mailing list pgsql-general

From Stephen Frost
Subject Re: libpq pipelineing
Date
Msg-id 20200629135506.GX3125@tamriel.snowman.net
Whole thread Raw
In response to Re: libpq pipelineing  (Samuel Williams <space.ship.traveller@gmail.com>)
List pgsql-general
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

Attachment

pgsql-general by date:

Previous
From: Stephen Frost
Date:
Subject: Re: PG13 Trusted Extension usability issue
Next
From: Paul Förster
Date:
Subject: Re: EXTERNAL: Re: Netapp SnapCenter