easier COUNT(*)

Issue #953 resolved
jek created an issue

func.count() with no arguments should emit COUNT(*)

Comments (5)

  1. jek reporter

    the axis is different for a * in COUNT(). it doesn't mean "expand to all columns" like it would in SELECT , it's more "expand to all rows" with no further evaluation whatsoever. it shouldn't ever be slower than COUNT(1). i'd bet lots of dbs rewrite a contant, true argument for COUNT() as COUNT() interally...

  2. Mike Bayer repo owner

    the original thread is at: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1156159920245

    Its pretty clear that very old versions of oracle (like, version 7 or earlier) had some internal expansion happening with count(*)...that idea is very widespread and a couple of articles mention "these days, count(1) and count(*) are the same". but pointless now, should probably take it out of the docs (i think a lot of examples reference it).

  3. Log in to comment