On Monday 27 August 2007 05:21, Sanjay <skpatel20@xxxxxxxxx> wrote: >Wondering why it is not using the index, which would have > been > automatically created for the primary key. Because you not only have just one row in the whole table, 100% of them will match the query. In short, one page fetch for a seq scan is faster than first looking it up in an index and then fetching the same page. set enable_seqscan=false; -- "Government big enough to supply everything you need is big enough to take everything you have ... the course of history shows that as a government grows, liberty decreases." -- Thomas Jefferson ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings