pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua D. Drake <jd@commandprompt.com>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: Peter Koczan <pjkoczan@gmail.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: disabling an index without deleting it?
Date: Tue, 26 Feb 2008 13:03:39 -0800
Message-ID: <20080226130339.64bd4ec3@commandprompt.com> (raw)
In-Reply-To: <dcc563d10802261257h6abfbc92x62a7569b8610ecc4@mail.gmail.com>
References: <4544e0330802261246t574167fdpc47629d1bbe64fed@mail.gmail.com>
	<dcc563d10802261257h6abfbc92x62a7569b8610ecc4@mail.gmail.com>

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

On Tue, 26 Feb 2008 14:57:51 -0600
"Scott Marlowe" <scott.marlowe@gmail.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-----


view thread (18+ messages)  latest in thread

Message-ID: <20080226130339.64bd4ec3@commandprompt.com>
Permalink:  ../20080226130339.64bd4ec3@commandprompt.com/
Also on:    postgresql.org/message-id/20080226130339.64bd4ec3@commandprompt.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: jd@commandprompt.com, scott.marlowe@gmail.com, pjkoczan@gmail.com
  Subject: Re: disabling an index without deleting it?
  In-Reply-To: <20080226130339.64bd4ec3@commandprompt.com>

* 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