Re: How to force PostgreSQL using an index

From: "Daniel Caune" <daniel(dot)caune(at)ubisoft(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Owen Jacobson" <ojacobson(at)osl(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: How to force PostgreSQL using an index
Date: 2006-02-15 23:22:20
Message-ID: 1E293D3FF63A3740B10AD5AAD88535D2019092DE@UBIMAIL1.ubisoft.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> "Owen Jacobson" <ojacobson(at)osl(dot)com> writes:
> > On Wed, Feb 15, 2006 at 04:58:54PM -0500, Daniel Caune wrote:
> >> I see, but that doesn't explain whether it is possible to specify
the
> >> index to use. It seems that those options just force PostgreSQL
using
> >> another plan.
>
> > Drop the simple index and re-create it when you're done?
>
> BTW, the cute way to do that is
>
> BEGIN;
> DROP INDEX unwanted;
> EXPLAIN ANALYZE whatever...;
> ROLLBACK;
>
> No need to actually rebuild the index when you are done.
>
> This does hold an exclusive lock on the table for the duration of your
> experiment, so maybe not such a good idea in a live environment ...
but
> then again, dropping useful indexes in a live environment isn't a good
> idea either, and this at least reduces the duration of the experiment
by
> a good deal.
>

Thanks, that's great!

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Glaesemann 2006-02-16 00:54:10 Re: alter table
Previous Message Tom Lane 2006-02-15 23:02:47 Re: How to force PostgreSQL using an index