SET SESSION enable_seqscan TO OFF could be interpreted as a strong hint to the 
server that you want it to use indexes.  It's not completely mandatory (the 
server WILL still do a sequential scan if it has to) but postgresql will 
strongly prefer index 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] 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 PostgreSQL decides 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
 

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to