From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
Cc: | "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 21:03:39 |
Message-ID: | 20080226130339.64bd4ec3@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 14:57:51 -0600
"Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> wrote:
> The brick to the head method would use set enable_indexscan = off;
> However, you can delete an index without actually deleting it like so:
>
> 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?
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)
iD8DBQFHxH6rATb/zqfZUUQRAp//AJ4wKiA4WRprp3L3y9UEAzz2rb2+hACaA9b7
A1k3n6GkyFwx2vrbnpD8CX0=
=zYaI
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-02-26 21:57:16 | Re: PG planning randomly ? |
Previous Message | Scott Marlowe | 2008-02-26 20:57:51 | Re: disabling an index without deleting it? |