cancel
Showing results for 
Search instead for 
Did you mean: 

Sql COUNT Performance Question

Former Member
4,963

Structure of Example table:

Id, Integer (PK)
Name, Varchar(100)
Description, Text

I need to know if exists difference in performance between:

SELECT COUNT(*) FROM Example;

and

SELECT COUNT(Id) FROM Example;

Or does not exists differences?

View Entire Topic
Former Member

My vote: no diff!
In old database servers, count(Id) or count(1) was faster than count(*).