Re: [GENERAL] PSQL command line print speed - Mailing list pgsql-general

From Francisco Olarte
Subject Re: [GENERAL] PSQL command line print speed
Date
Msg-id CA+bJJbxMwgiwofi8b=05Ej4j1o1n0LGZJtqVMe90G3XysSWtpA@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] PSQL command line print speed  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Adrian:

On Wed, May 17, 2017 at 8:40 PM, Adrian Klaver
<adrian.klaver@aklaver.com> wrote:
> On 05/17/2017 09:46 AM, Adrian Myers wrote:
>> Ah I should have mentioned, the pager is off.
> Is that by choice and if so why?
>
> With the pager off you have to wait for the entire output to write to the
> screen. For anything but a small dataset that is going to take time.

Are you sure? IIRC hespecifically said the output started promptly but
was slow, i.e. speed, not latency problems as your are hinting.

And, IIRC again, psql uses libpq which always buffer the entire
response to the queries.

And nothing prohibits you from starting the output as soon as you can
calculate it even if no pager there ( note you have to make things
like calculate column widths, but this is done with and without pager
). In fact normally the pager will just introduce an small but
potentially noticeable delay.

Francisco Olarte.


pgsql-general by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: [GENERAL] PSQL command line print speed
Next
From: Eric Hill
Date:
Subject: Re: [GENERAL] storing large files in database - performance