Home Forums SQL Server 7,2000 T-SQL SELECT COUNT(*) or COUNT(1) Performance or Benefits? RE: SELECT COUNT(*) or COUNT(1) Performance or Benefits?
David.Poole
SSC Guru
Points: 75898
More actions
May 10, 2005 at 10:22 am
#557831
COUNT(*) or count(1) returns a count of all records including NULLS.
COUNT(expression) returns a count of all non-null records.
The first two don't seem to have any performance difference or differences in the execution plan they generate.