Re: indexes are not working for

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Anshaj <anshaj(at)in2m(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: indexes are not working for
Date: 2004-10-22 14:04:55
Message-ID: 6488.1098453895@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Anshaj <anshaj(at)in2m(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Joe Maldonado 2004-10-22 14:51:14 Re: REVOKE not working...
Previous Message Stephan Szabo 2004-10-22 13:33:58 Re: REVOKE not working...