From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Gregory Wood" <gregw(at)com-stock(dot)com> |
Cc: | "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Yet another "Why won't PostgreSQL use my index?" |
Date: | 2002-06-20 16:54:43 |
Message-ID: | 12800.1024592083@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Gregory Wood" <gregw(at)com-stock(dot)com> writes:
> Trying to use a single column index on a somewhat large table (1.9M rows),
> and PostgreSQL really doesn't want to. It estimates the number of rows at
> 12749 (actual 354), which is only .6% of the table... well within reasonable
> index range I would think. And yes, I've run an analyze on the table.
Could we see the analyze results --- ie, the pg_stats row for the
idx_siteid column?
Increasing the statistics target for that column might help, but I'm
interested to see what it thinks the distribution is right now. The
problem AFAICT is the factor-of-36 overestimation of the number of
matching rows; had that estimate been even within a factor of 20 of
correct, the correct plan would have been chosen.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Manfred Koizar | 2002-06-20 16:55:05 | Re: Yet another "Why won't PostgreSQL use my index?" |
Previous Message | Chris Bowlby | 2002-06-20 16:53:44 | login issue.. |