| From: | tgl(at)postgresql(dot)org (Tom Lane) |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Fix an old error in clause_selectivity: the default selectivity |
| Date: | 2008-01-11 17:00:45 |
| Message-ID: | 20080111170045.AE8BA754108@cvs.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Log Message:
-----------
Fix an old error in clause_selectivity: the default selectivity estimate
for unhandled clause types ought to be 0.5, not 1.0. I fear I introduced
this silliness due to misreading the intent of the very-poorly-structured
code that was there when we inherited the file from Berkeley. The lack
of sanity in this behavior was exposed by an example from Sim Zacks.
(Arguably this is a bug fix and should be back-patched, but I'm a bit
hesitant to introduce a possible planner behavior change in the back
branches; it might detune queries that worked acceptably in the past.)
While at it, make estimation for DistinctExpr do something marginally
realistic, rather than just defaulting.
Modified Files:
--------------
pgsql/src/backend/optimizer/path:
clausesel.c (r1.89 -> r1.90)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/clausesel.c?r1=1.89&r2=1.90)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2008-01-11 18:39:41 | pgsql: The original implementation of polymorphic aggregates didn't |
| Previous Message | Bruce Momjian | 2008-01-11 16:49:27 | pgsql: Add: > * Add ability to trigger on TRUNCATE > > |