Yes , that was the case indeed. I disabled seq scan and it used the index. And
the cost was higher than seq scan.
Thanks a lot for all your replies.
With warm regards.
Vivek J. Joshi.
[EMAIL PROTECTED]
Trikon Electronics Pvt. Ltd.
All science is either physics or stamp collecting.
On 12/2/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
The index was created before the table was populated. There are 3 rows in
the table for 3 different users. Now when I do a
postgresql will not use index scan for table with 3 rows in it. it is way
faster to use seq scan on it.
depesz
am Sat, dem 02.12.2006, um 16:35:47 +0530 mailte [EMAIL PROTECTED] folgendes:
>
> The index was created before the table was populated. There are 3 rows
> in the table for 3 different users. Now when I do a
In this case, with only 3 rows, it is much cheaper to do a seq-scan
instead a index-scan
Vivek --
If you could let people know what version of postgres, and which OS, it might
help.
A guess: the planner sees that there are very few rows and decides that a
sequential scan is faster (this is because a sequential scan on a table with
only a few rows is probably done in one operation;