Well, these counters are not identical and will do different things.
select count(1) select count(*)
Identical and will count every entry!
select count(col_name)
Will only count NOT NULL values ββon col_name !
So, if col_name not PK , as you said, this query will do different things.
As a second question for you, it depends, we cannot provide you with a general answer that will always be true. You will have to look at the plan of explanation or just check your βIβ, although I believe that adding this WHERE would be better.
source share