Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

Next:From: Joe MaldonadoDate: 2004-10-22 14:51:14
Subject: Re: REVOKE not working...
Previous:From: Stephan SzaboDate: 2004-10-22 13:33:58
Subject: Re: REVOKE not working...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group