This content has been marked as final. Show 2 replies
1) There is no difference in performance for any vaguely recent version of Oracle.
2) If there ever is a difference, COUNT(*) would be the form that would be optimized. So if there ever is a difference COUNT(*) will be faster.
3) COUNT(1) does not count the first column. It counts the literal number 1 for every row. You'd get the same behavior if you did COUNT('BadgerBadgerBadger') or COUNT( date '2012-01-15' ).
4) If I see code that has a bunch of COUNT(1)'s, I generally assume that whoever wrote it is prone to believing random myths they've found on the internet rather than testing thing for themselves so I assume that the surrounding code is more likely to have bugs. Particularly if I'm doing a code review.