#162 count(1) is more effecient than count(*)

open
nobody
General (126)
5
2013-01-18
2006-03-22
Andrew Barilla
No

Instead of COUNT(*), COUNT(1) is more effecient. I'm
not sure if this is compatible with all of the DBMSes
but I know it works with MSSQL and Postgresql.

This is because the database engine/server does not
need to pull back all of the database fields.

Discussion