Re: indexes are not working for - Mailing list pgsql-admin

From Tom Lane
Subject Re: indexes are not working for
Date
Msg-id 6488.1098453895@sss.pgh.pa.us
Whole thread Raw
In response to indexes are not working for  (Anshaj <anshaj@in2m.com>)
List pgsql-admin
Anshaj <anshaj@in2m.com> writes:
> when I try to do a query like
> explain analyze select * from foo where snumber > 1000;
> It do a sequence scan on table.

One-sided inequalities are frequently not selective enough to justify an
indexscan.  A rule of thumb is that if the WHERE selects more than one
or two percent of the table, you will (and should) get a seqscan.

            regards, tom lane

pgsql-admin by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: REVOKE not working...
Next
From: Joe Maldonado
Date:
Subject: Re: REVOKE not working...