Re: speed up full table scan using psql

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Lian Jiang <jiangok2006(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: speed up full table scan using psql
Date: 2023-05-31 15:14:44
Message-ID: c4bfbccc-b004-5830-ade9-c1a12db91e8a@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/30/23 21:25, Lian Jiang wrote:
> hi,
>
> I am using psql to periodically dump the postgres tables into json files
> which are imported into snowflake. For large tables (e.g. 70M rows), it

The command you are using is?

Postgres version?

> takes hours for psql to complete. Using spark to read the postgres table
> seems not to work as the postgres read only replication is the
> bottleneck so spark cluster never uses >1 worker node and the working
> node timeout or out of memory.
>
> Will vertical scaling the postgres db speed up psql? Or any thread
> related parameter of psql can help? Thanks for any hints.
>
> Regards
> Lian

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2023-05-31 15:31:30 Re: Help needed to understand query planner regression with incremental sort
Previous Message Adrian Klaver 2023-05-31 15:11:14 Re: Is there a bug in psql? (SELECT ''';)