Re: How to improve insert speed with index on text column - Mailing list pgsql-performance

From Andy Colson
Subject Re: How to improve insert speed with index on text column
Date
Msg-id 4F26E25C.1020402@squeakycode.net
Whole thread Raw
In response to How to improve insert speed with index on text column  (Saurabh <saurabh.b85@gmail.com>)
List pgsql-performance
On 1/30/2012 3:27 AM, Saurabh wrote:
> Hi all,
>
> I am using Postgresql database for our project and doing some
> performance testing. We need to insert millions of record with indexed
> columns. We have 5 columns in table. I created index on integer only
> then performance is good but when I created index on text column as
> well then the performance reduced to 1/8th times. My question is how I
> can improve performance when inserting data using index on text
> column?
>
> Thanks,
> Saurabh
>

Do it in a single transaction, and use COPY.

-Andy

pgsql-performance by date:

Previous
From: Claudio Freire
Date:
Subject: Re: How to improve insert speed with index on text column
Next
From: Alessandro Gagliardi
Date:
Subject: Why should such a simple query over indexed columns be so slow?