I have the same table definition in two different databases on the same computer. When I explain a simple query in both of them, one database uses a sequence scan and the other uses an index scan. If I try to run the Seq Scan version without the where clause restricting the value of uniqueid, it uses all of the memory on my computer and never completes.
How can I get the Seq Scan version to use an index scan?
Did you run "ANALYZE your-table-name" before trying the sequential scan query?
No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.3349 / Virus Database: 3204/6483 - Release Date: 07/11/13