On Fri, Jul 04, 2008 at 12:37:48PM -0400, Tom Lane wrote:
> Yeah, estimate_num_groups doesn't have any special knowledge about IS
> NULL -- it just sees this as "an expression involving col". The
> general assumption about that is that the expression doesn't reduce
> the number of groups (think "c
Sam Mason <[EMAIL PROTECTED]> writes:
> I've just noticed that the planner in 8.3.3 doesn't seem to realize the
> difference in the result of the following:
> GROUP BY col;
> GROUP BY col IS NULL;
Yeah, estimate_num_groups doesn't have any special knowledge about IS
NULL -- it just sees this a
Hi,
I've just noticed that the planner in 8.3.3 doesn't seem to realize the
difference in the result of the following:
SELECT col, COUNT(*)
FROM tbl
GROUP BY col;
and
SELECT col IS NULL, COUNT(*)
FROM tbl
GROUP BY col IS NULL;
For a table with several million distinct values in "co