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 144D12D7DD4EC04F99241498BB4EEDCC220834@nelson.osl.com
Whole thread Raw
In response to How to force PostgreSQL using an index  ("Daniel Caune" <daniel.caune@ubisoft.com>)
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: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Daniel Caune
Sent: Wednesday, February 15, 2006 1:59 PM
To: pgsql-sql@postgresql.org
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