Skip site navigation (1) Skip section navigation (2)

Re: How to improve insert speed with index on text column

From: Andy Colson <andy(at)squeakycode(dot)net>
To: Saurabh <saurabh(dot)b85(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: How to improve insert speed with index on text column
Date: 2012-01-30 18:33:00
Message-ID: 4F26E25C.1020402@squeakycode.net (view raw, whole thread or download thread mbox)
Thread:
Lists: 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

In response to

pgsql-performance by date

Next:From: Alessandro GagliardiDate: 2012-01-30 19:13:08
Subject: Why should such a simple query over indexed columns be so slow?
Previous:From: Claudio FreireDate: 2012-01-30 18:20:28
Subject: Re: How to improve insert speed with index on text column

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group