Menu

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

open
nobody
General (125)
5
2013-01-18
2006-03-22
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


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.