As I already wrote,
COUNT(*) can be
expensive in InnoDB, because this value is not stored in indexes.
Some other storage engines may not store that value. Also,
immediate only if executed on an indexed column. But we don’t
want too many indexes, and some exotic storage engines do not
support indexes – thus, we may need to execute an aggregate
function on a non-indexed column.
Now, the question is: do you really need such values to …[Read more...]