From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Jeff Davis" <pgsql(at)j-davis(dot)com>, <len(at)pdx(dot)edu>, <len(at)cs(dot)pdx(dot)edu>, <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Understanding histograms |
Date: | 2008-05-01 00:53:44 |
Message-ID: | 87skx24zfr.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Right. As a matter of policy we never estimate less than one matching
> row; and I've seriously considered pushing that up to at least two rows
> except when we see that the query condition matches a unique constraint.
> You can get really bad join plans from overly-small estimates.
This is something that needs some serious thought though. In the case of
partitioned tables I've seen someone get badly messed up plans because they
had a couple hundred partitions each of which estimated to return 1 row. In
fact of course they all returned 0 rows except the correct partition. (This
was in a join so no constraint exclusion)
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!
From | Date | Subject | |
---|---|---|---|
Next Message | Marc G. Fournier | 2008-05-01 04:16:00 | Please ignore ... |
Previous Message | Tom Lane | 2008-04-30 23:17:44 | Re: Understanding histograms |