Skip site navigation (1) Skip section navigation (2)

Re: Forcing use of a particular index

From: Jacques Caron <jc(at)directinfos(dot)com>
To: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Forcing use of a particular index
Date: 2005-06-27 22:40:53
Message-ID: 6.2.0.14.0.20050628003823.065c2de8@pop.interactivemediafactory.net (view raw or flat)
Thread:
Lists: pgsql-performance
Hi,

At 01:16 28/06/2005, Karl O. Pinc wrote:
>http://www.postgresql.org/docs/8.0/static/indexes-examine.html
>
>Says:
>
>"If you do not succeed in adjusting the costs to be more
>appropriate, then you may have to resort to forcing index
>usage explicitly."
>
>Is there a way to force a query to use a particular index?

Not that I know of.

>If not, what does this sentence mean?

That you can force the planner to use an index (any one) over not using an 
index (and using seq scans instead) by setting enable_seqscan to off.

Jacques.



In response to

pgsql-performance by date

Next:From: Karl O. PincDate: 2005-06-27 23:09:26
Subject: Poor index choice -- multiple indexes of the same columns
Previous:From: Josh BerkusDate: 2005-06-27 22:37:41
Subject: Re: Poor index choice -- multiple indexes of the same columns

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group