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

From Pavel Stehule
Subject Re: [GENERAL] PSQL command line print speed
Date
Msg-id CAFj8pRDqDx9YmD9O8Ta+C_LgrMTU2qmzgGcShzW8G7djE_r2FA@mail.gmail.com
Whole thread Raw
In response to [GENERAL] PSQL command line print speed  (Adrian Myers <hadrianmyers@gmail.com>)
List pgsql-general
Hi

2017-05-17 18:03 GMT+02:00 Adrian Myers <hadrianmyers@gmail.com>:
Is there a way to speed up the actual line-by-line display of the psql console in version 8.4?

Queries which perform in a few milliseconds through a driver (psycopg2 in this case) can take several seconds or minutes to complete in the console, seemingly just due to it printing lines at a very leisurely pace (in other words, this is not the delay caused by the query itself, often it starts printing almost instantly but spends a very long time just writing output). While overall application performance is unaffected, simple admin tasks and poking around the data take longer than I would like as a result. Is there any way to improve just the display/write performance in the console?

try to play with used format

probably unalign format will be faster

postgres=# \pset format unaligned 
Output format is unaligned.

Regards

Pavel
 

Thanks for any insight,
Adrian

pgsql-general by date:

Previous
From: Adrian Myers
Date:
Subject: [GENERAL] PSQL command line print speed
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2