From: Andres Freund <andres@anarazel.de>
To: pgsql-performance@postgresql.org
Cc: Divakar Singh <dpsmails@yahoo.com>
Subject: Re: Insert performance with composite index
Date: Mon, 1 Nov 2010 15:03:51 +0100
Message-ID: <201011011503.51821.andres@anarazel.de> (raw)
In-Reply-To: <293254.80548.qm@web65413.mail.ac4.yahoo.com>
References: <293254.80548.qm@web65413.mail.ac4.yahoo.com>
Hi,
On Monday 01 November 2010 13:49:14 Divakar Singh wrote:
> When I tried inserting 1M rows into a table with a Primary Key, it took
> almost 62 seconds.
> After adding a composite index of 2 columns, the performance degrades to
> 125 seconds.
> I am using COPY to insert all data in 1 transaction.
Without seeing your config its hard to suggest anything here. Did you do basic
tuning of your pg installation?
wal_buffers, shared_buffers, checkpoint_segments, maintenance_work_mem are
likely most relevant for that specific case.
Andres
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: andres@anarazel.de, dpsmails@yahoo.com
Subject: Re: Insert performance with composite index
In-Reply-To: <201011011503.51821.andres@anarazel.de>
* 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