From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steve Lane <slane@moyergroup.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Drop indexes inside transaction?
Date: Fri, 06 Feb 2004 01:23:01 -0500
Message-ID: <24577.1076048581@sss.pgh.pa.us> (raw)
In-Reply-To: <BC486AB3.9862%slane@moyergroup.com>
References: <BC486AB3.9862%slane@moyergroup.com>
Steve Lane <slane@moyergroup.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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, slane@moyergroup.com
Subject: Re: Drop indexes inside transaction?
In-Reply-To: <24577.1076048581@sss.pgh.pa.us>
References: <BC486AB3.9862%slane@moyergroup.com> <24577.1076048581@sss.pgh.pa.us>
* 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