pgsql: Fix estimate_num_groups() to assume that GROUP BY expressions - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix estimate_num_groups() to assume that GROUP BY expressions
Date
Msg-id 20080707202456.29DAB754857@cvs.postgresql.org
Whole thread Raw
List 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.

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        selfuncs.c (r1.249 -> r1.250)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c?r1=1.249&r2=1.250)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix AT TIME ZONE (in all three variants) so that we first try to
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix estimate_num_groups() to assume that GROUP BY expressions