Re: index use again and again

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: holger(at)marzen(dot)de
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: index use again and again
Date: 2002-02-12 15:29:18
Message-ID: 21569.1013527758@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Holger Marzen <holger(at)marzen(dot)de> writes:
> Are 152428 rows not enough to use the index?

More like "there are too many rows to use the index".

You've got a query that is estimated to hit 22322/152428 = 15% of the
table. If the rows in question are uniformly scattered through the
table then the system will certainly have to read every block of the
table to get them all. It may as well read the table sequentially,
rather than do the extra I/O to read the index too.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-02-12 15:34:55 Re: Index on timestamp field, and now()
Previous Message Denis Perchine 2002-02-12 15:13:11 Re: Index on timestamp field, and now()