Re: Slow query - index not used

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: michael(at)synchronicity(dot)com
Cc: Pgsql-Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Slow query - index not used
Date: 2004-01-20 23:56:12
Message-ID: 27761.1074642972@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Brusser <michael(at)synchronicity(dot)com> writes:
> Using "DEFAULT_STATISTICS_TARGET = 100" made db use index for
> field = 'abc', but field = 'xyz' still results in the table scan.

What's the actual distribution of values in these columns? Are you
searching for values that are particularly common or uncommon?

> Also 'rows' number reported in the plan is way off.

That would seem to be the crux of the problem, but you'd better be more
specific than "way off".

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2004-01-21 00:21:57 Re: Old binary packages.
Previous Message Tom Lane 2004-01-20 23:50:03 Re: Current-stream read for psql's \copy