From: Vijaykumar Jain <vjain@opentable.com>
To: Christopher Browne <cbbrowne@gmail.com>
To: sravikrishna@aol.com <sravikrishna@aol.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: [External] Multiple COPY on the same table
Date: Mon, 20 Aug 2018 17:28:24 +0000
Message-ID: <6841C20B-0BED-4632-A355-D6C59E91ED18@opentable.com> (raw)
In-Reply-To: <CAFNqd5VTrOZP=zW0x0myGDgvx1-U0-6SH-Pg64igW4CfqYDYkg@mail.gmail.com>
References: <387511900.10216038.1534783946721.ref@mail.yahoo.com>
<387511900.10216038.1534783946721@mail.yahoo.com>
<CAFNqd5VTrOZP=zW0x0myGDgvx1-U0-6SH-Pg64igW4CfqYDYkg@mail.gmail.com>
I guess this should help you, Ravi.
https://www.postgresql.org/docs/10/static/populate.html
On 8/20/18, 10:30 PM, "Christopher Browne" <cbbrowne@gmail.com> wrote:
On Mon, 20 Aug 2018 at 12:53, Ravi Krishna <sravikrishna@aol.com> wrote:
> > What is the goal you are trying to achieve here.
> > To make pgdump/restore faster?
> > To make replication faster?
> > To make backup faster ?
>
> None of the above.
>
> We got csv files from external vendor which are 880GB in total size, in 44 files. Some of the large tables had COPY running for several hours. I was just thinking of a faster way to load.
Seems like #4...
#4 - To Make Recovery faster
Using COPY pretty much *is* the "faster way to load"...
The main thing you should consider doing to make it faster is to drop
indexes and foreign keys from the tables, and recreate them
afterwards.
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"
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: vjain@opentable.com, cbbrowne@gmail.com, sravikrishna@aol.com
Subject: Re: [External] Multiple COPY on the same table
In-Reply-To: <6841C20B-0BED-4632-A355-D6C59E91ED18@opentable.com>
References: <387511900.10216038.1534783946721.ref@mail.yahoo.com> <387511900.10216038.1534783946721@mail.yahoo.com> <CAFNqd5VTrOZP=zW0x0myGDgvx1-U0-6SH-Pg64igW4CfqYDYkg@mail.gmail.com> <6841C20B-0BED-4632-A355-D6C59E91ED18@opentable.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