Re: Drop indexes inside transaction?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Lane <slane(at)moyergroup(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Drop indexes inside transaction?
Date: 2004-02-06 06:23:01
Message-ID: 24577.1076048581@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Steve Lane <slane(at)moyergroup(dot)com> writes:
> Now we want to use COPY to bring the data in. The target table has 6
> indexes. Without indexes, naturally, we can load 80K rows in 2 seconds. With
> indexes, 46 seconds. (oddly, ONE index contributes 40+ seconds of that, yet
> they're all similar, single-column indexes. Anyway, that's another story).

No, I'd say that's the key part of the story. Details?

> So I hit on the idea of doing the same thing, but inside a transaction. In
> theory that should affect no one else.

... other than locking them out of the table while the transaction runs.
That doesn't sound like what you want to do. In any case, reindexing
the table will get slower and slower as the pre-existing data in the
table expands.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-02-06 06:30:15 Re: Index (re)-creation speed
Previous Message Steve Lane 2004-02-06 04:36:52 Index (re)-creation speed