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

From: Rosser Schwarz <rosser(dot)schwarz(at)gmail(dot)com>
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-02-01 03:29:18
Message-ID: CAFnxYwi80kvcC4zhjPT5EX6r+-2EfHYZG4XrV1-YnK9=4bdF7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Jan 30, 2012 at 9:46 AM, Saurabh <saurabh(dot)b85(at)gmail(dot)com> wrote:
> I can not create the index after insertion because user can
> search the data as well while insertion.

Remember, DDL is transactional in PostgreSQL. In principle, you
should be able to drop the index, do your inserts, and re-create the
index without affecting concurrent users, if you do all of that inside
an explicit transaction. Doing the inserts inside a transaction may
speed them up, as well.

rls

--
:wq

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Claudio Freire 2012-02-01 03:49:09 Re: How to improve insert speed with index on text column
Previous Message Jeff Janes 2012-02-01 02:11:57 Re: How to improve insert speed with index on text column