Why is COUNT(*)
so much quicker than COUNT(field)
, Even when field
is an index?
I am using MySQL
Why is COUNT(*)
so much quicker than COUNT(field)
, Even when field
is an index?
I am using MySQL
COUNT(field)
will not count that row when field is null
, so there is an additional check it must do.
COUNT(*)
simply counts rows.