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

From Claudio Freire
Subject Re: How to improve insert speed with index on text column
Date
Msg-id CAGTBQpYZY=0KjBXQK5fRDbHJ+RvKk9RiS6eFM+ELOcfCojwWGw@mail.gmail.com
Whole thread Raw
In response to Re: How to improve insert speed with index on text column  (Rosser Schwarz <rosser.schwarz@gmail.com>)
Responses Re: How to improve insert speed with index on text column  (Claudio Freire <klaussfreire@gmail.com>)
List pgsql-performance
On Wed, Feb 1, 2012 at 12:29 AM, Rosser Schwarz
<rosser.schwarz@gmail.com> wrote:
> 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.

Creating an index requires an update lock on the table, and an
exclusive lock on the system catalog.
Even though with "CONCURRENTLY" it's only for a short while.
So it does affect concurrent users.

pgsql-performance by date:

Previous
From: Rosser Schwarz
Date:
Subject: Re: How to improve insert speed with index on text column
Next
From: Claudio Freire
Date:
Subject: Re: How to improve insert speed with index on text column