pgsql: Fix estimate_num_groups() to assume that GROUP BY expressions

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix estimate_num_groups() to assume that GROUP BY expressions
Date: 2008-07-07 20:25:31
Message-ID: 20080707202531.13886754857@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix estimate_num_groups() to assume that GROUP BY expressions yielding boolean
results always contribute two groups, regardless of the expression contents.
This is very substantially more accurate than the regular heuristic for
certain boolean tests like "col IS NULL". Per gripe from Sam Mason.

Back-patch to all supported releases, since the behavior of
estimate_num_groups() hasn't changed all that much since 7.4.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
pgsql/src/backend/utils/adt:
selfuncs.c (r1.169.4.6 -> r1.169.4.7)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c?r1=1.169.4.6&r2=1.169.4.7)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-07-07 20:25:40 pgsql: Fix estimate_num_groups() to assume that GROUP BY expressions
Previous Message Tom Lane 2008-07-07 20:25:23 pgsql: Fix estimate_num_groups() to assume that GROUP BY expressions