Re: why my query is not using index??

From: Greg Stark <gsstark(at)mit(dot)edu>
To: John Meinel <john(at)johnmeinel(dot)com>
Cc: Francisco Reyes <lists(at)natserv(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: why my query is not using index??
Date: 2004-10-12 01:13:27
Message-ID: 87fz4k3fig.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


John Meinel <john(at)johnmeinel(dot)com> writes:

> As Janning mentioned, sometimes sequential scans *are* faster. If the number of
> entries that will be found is large compared to the number of total entries (I
> don't know the percentages, but probably >30-40%),

Actually 30%-40% is unrealistic. The traditional rule of thumb for the
break-even point was 10%. In POstgres the actual percentage varies based on
how wide the records are and how correlated the location of the records is
with the index. Usually it's between 5%-10% but it can be even lower than that
sometimes.

--
greg

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Christopher Browne 2004-10-12 01:34:44 Re: IBM P-series machines (was: Excessive context
Previous Message Tom Lane 2004-10-12 00:28:28 Re: EXPLAIN ANALYZE much slower than running query normally