indexed column not working as fast as expected - Mailing list pgsql-general

From Amir Zicherman
Subject indexed column not working as fast as expected
Date
Msg-id 27a5b7d1040817162437e2e6f@mail.gmail.com
Whole thread Raw
Responses Re: indexed column not working as fast as expected  ("Glen Parker" <glenebob@nwlink.com>)
List pgsql-general
hi,

i have a btree index on col1 in table1.  The column has either values
1,2,3, or 4.  4 does not appear that much in the table (only 5 times).
there are about 20 million rows in the table.  when i do a "select *
from table1 where col1=4" it takes very long time to get back to me
(around 4 minutes).  why is it taking so long if i have an index on
it?  I also tried this with a hash index and it was still slow.

thanx, amir

pgsql-general by date:

Previous
From: Chris Travers
Date:
Subject: Re: Web application: Programming language/Framework
Next
From: "Dann Corbit"
Date:
Subject: Re: Fw: libpq or Embedded SQL in C