Re: PSQL command line print speed

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Adrian Myers <hadrianmyers(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: PSQL command line print speed
Date: 2017-05-18 06:49:46
Message-ID: CA+bJJbxMwgiwofi8b=05Ej4j1o1n0LGZJtqVMe90G3XysSWtpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian:

On Wed, May 17, 2017 at 8:40 PM, Adrian Klaver
<adrian(dot)klaver(at)aklaver(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Eric Hill 2017-05-18 12:34:47 Re: storing large files in database - performance
Previous Message Francisco Olarte 2017-05-18 06:46:17 Re: PSQL command line print speed