Okay, are you ready? The difference between count(*) and count(1) is a spin through this: for (i = 1; i <= numTransInputs; i++) { if (fcinfo->args[i].isnull) return; } But for each row, so it's probably like tens of microseconds on a large grouping!
The fact that the expression is constant (and the planner knows this) doesn't mean that we can avoid actually setting up the value at runtime (and checking it for nullity). The parameter is never actually used, but we don't know that unless we hardcode assumptions about count()
-
-
Surely we could do it with SupportRequestSimplify, no?
-
unless I'm missing something, we don't call that for aggs
- 1 more reply
New conversation -
-
-
Well, my assumption was that such assumptions would be OK :)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
