Is there any difference in the performance, or the background execution behavior when counting * , any custom field ( n ), or the primary id in MySQL?
What exactly does * refer to in the query, and how does it differ from those two other ways?
SELECT COUNT( * ) FROM t;
SELECT COUNT( id ) FROM t;
SELECT COUNT( n ) FROM t;
UPDATE:
Assume, that neither id nor n is null at any record.
count(1)