Re: disabling an index without deleting it?

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>, "Peter Koczan" <pjkoczan(at)gmail(dot)com>, pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: disabling an index without deleting it?
Date: 2008-02-26 22:37:38
Message-ID: 20080226143738.05d2cb78@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 26 Feb 2008 17:22:40 -0500
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> > "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> wrote:
> >> begin;
> >> drop index abc_dx;
> >> select ....
> >> rollback;
> >>
> >> and viola, your index is still there. note that there are likely
> >> some locking issues with this, so be careful with it in
> >> production. But on a test box it's a very easy way to test
> >> various indexes.
>
> > Wouldn't you also bloat the index?
>
> No, what makes you think that?

Well now that I am obviously wrong :P. I was thinking about it from the:

BEGIN;
DELETE FROM
ROLLBACK;

Perspective.

Sincerely,

Joshua D. Drake

- --
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL SPI Liaison | SPI Director | PostgreSQL political pundit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHxJSyATb/zqfZUUQRAnSPAJkB6Gz0gUTPohXcFak9LbVYIdxCtwCfWvxp
gQZymMaKEXfo2Mf1E2BWtUk=
=p+EO
-----END PGP SIGNATURE-----

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2008-02-26 23:01:58 Re: LISTEN / NOTIFY performance in 8.3
Previous Message Tom Lane 2008-02-26 22:22:40 Re: disabling an index without deleting it?