pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Lian Jiang <jiangok2006@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: speed up full table scan using psql
Date: Wed, 31 May 2023 08:14:44 -0700
Message-ID: <c4bfbccc-b004-5830-ade9-c1a12db91e8a@aklaver.com> (raw)
In-Reply-To: <CA+aY8X6E6qq-i_10G_wTjkorEtm3XYW+Ag+83xk7gmJUoAoing@mail.gmail.com>
References: <CA+aY8X6E6qq-i_10G_wTjkorEtm3XYW+Ag+83xk7gmJUoAoing@mail.gmail.com>

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.klaver@aklaver.com






view thread (12+ messages)  latest in thread

Message-ID: <c4bfbccc-b004-5830-ade9-c1a12db91e8a@aklaver.com>
Permalink:  ../c4bfbccc-b004-5830-ade9-c1a12db91e8a@aklaver.com/
Also on:    postgresql.org/message-id/c4bfbccc-b004-5830-ade9-c1a12db91e8a@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, jiangok2006@gmail.com
  Subject: Re: speed up full table scan using psql
  In-Reply-To: <c4bfbccc-b004-5830-ade9-c1a12db91e8a@aklaver.com>
  References: <CA+aY8X6E6qq-i_10G_wTjkorEtm3XYW+Ag+83xk7gmJUoAoing@mail.gmail.com> <c4bfbccc-b004-5830-ade9-c1a12db91e8a@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox