From: Andy Colson <andy@squeakycode.net>
To: Saurabh <saurabh.b85@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to improve insert speed with index on text column
Date: Mon, 30 Jan 2012 12:33:00 -0600
Message-ID: <4F26E25C.1020402@squeakycode.net> (raw)
In-Reply-To: <bdd5c927-eeb7-46ed-a9a6-231b731f37e8@t15g2000yqi.googlegroups.com>
References: <bdd5c927-eeb7-46ed-a9a6-231b731f37e8@t15g2000yqi.googlegroups.com>
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
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: andy@squeakycode.net, saurabh.b85@gmail.com
Subject: Re: How to improve insert speed with index on text column
In-Reply-To: <4F26E25C.1020402@squeakycode.net>
* 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