I have not benchmarked it but I assume that would be true. It's a quick test. 
For example, consider the performance difference between "select count(1) from ...", "select count(1), count(2) from ...", and "select count(1), count(*) from ..." on the same input. (Note that the two count() calls MUST be different or they will be combined)
-
-
2/47 seconds is still 5%, though. Does the parser have some pre-existing way of recognising constant expressions like "1"? Might be a low hanging fruit... It probably isn't, as these things are often more complicated than it seems from the outside.
-
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()
- 3 more replies
New conversation -
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.
