Re: Bulk Insert into PostgreSQL

From: Srinivas Karthik V <skarthikv(dot)iitb(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, Don Seiler <don(at)seiler(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Subject: Re: Bulk Insert into PostgreSQL
Date: 2018-07-05 08:48:49
Message-ID: CAEfuzeRYxfKx8BS7GODWLLLBOoRU3r3egi1SvMqJ0cyWyFTY6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for the link!

Alternatively, when I am trying to create an index on a column of a table
which is of size 400 GB, it is taking roughly 7 hrs. The index is created
only on one column which is not a primary key. The query I am using is,
create index on table (colname). I request your valuable suggestions for
the same. The configuration parameters are:

shared_buffers =12GB
maintainence_work_mem = 8GB
work_mem = 1GB
fsync = off
synchronous_commit = off
checkpoint_segments = 256
checkpoint_timeout = 1h
checkpoint_completion_target = 0.9
checkpoint_warning = 0
autovaccum = off

Regards,
Srinivas Karthik

On Wed, Jul 4, 2018 at 10:27 PM, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:

> On Tue, Jul 3, 2018 at 4:34 PM, Srinivas Karthik V
> <skarthikv(dot)iitb(at)gmail(dot)com> wrote:
> > @Peter: I was indexing the primary key of all the tables in tpc-ds. Some
> of
> > the fact tables has multiple columns as part of the primary key. Also,
> most
> > of them are numeric type.
>
> Please see my mail to -hackers on suffix truncation:
> https://postgr.es/m/CAH2-Wzn5XbCzk6u0GL+uPnCp1tbrp2pJHJ=3bYT4yQ0_
> zzHxmw(at)mail(dot)gmail(dot)com
>
> Perhaps this is related in some way, since in both cases we're talking
> about a composite index on varlena-type columns, where the types have
> expensive comparisons.
>
> --
> Peter Geoghegan
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-07-05 09:18:56 Re: Speeding up INSERTs and UPDATEs to partitioned tables
Previous Message Masahiko Sawada 2018-07-05 08:24:48 Re: Copy function for logical replication slots