Re: Insert performance with composite index

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-performance(at)postgresql(dot)org
Cc: Divakar Singh <dpsmails(at)yahoo(dot)com>
Subject: Re: Insert performance with composite index
Date: 2010-11-01 14:03:51
Message-ID: 201011011503.51821.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Andres Freund 2010-11-01 14:14:31 Re: Insert performance with composite index
Previous Message Cédric Villemain 2010-11-01 13:57:56 Re: Insert performance with composite index