• Tom Lane's avatar
    Fix estimate_num_groups() to assume that GROUP BY expressions yielding boolean · 170063cd
    Tom Lane authored
    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.
    170063cd
selfuncs.c 157 KB