Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: How to force PostgreSQL using an index - Mailing list pgsql-sql

From Owen Jacobson
Subject Re: How to force PostgreSQL using an index
Date
Msg-id [email protected]
Whole thread Raw
In response to How to force PostgreSQL using an index  ("Daniel Caune" <[email protected]>)
List pgsql-sql
SET SESSION enable_seqscan TO OFF could be interpreted as a strong hint to the server that you want it to use indexes.
It'snot completely mandatory (the server WILL still do a sequential scan if it has to) but postgresql will strongly
preferindex scans.  You may also have some luck twiddling the cpu_index_tuple_cost option. 

- Owen

(Apologies for the Outlookism.)

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Daniel Caune
Sent: Wednesday, February 15, 2006 1:59 PM
To: [email protected]
Subject: [SQL] How to force PostgreSQL using an index


Hi,
Is there a way to force PostgreSQL using an index for a SELECT statement?  I just want to confirm that the index
PostgreSQLdecides to use is better than the index I supposed PostgreSQL would use (I already analyze the table). 
Regards,
--
Daniel CAUNE
Ubisoft Online Technology
(514) 4090 2040 ext. 5418


pgsql-sql by date:

Previous
From: "Daniel Caune"
Date:
Subject: How to force PostgreSQL using an index
Next
From: Andrew Sullivan
Date:
Subject: Re: How to force PostgreSQL using an index