MySQL Forums
Forum List  »  Performance

Re: COUNT(*) very slowly in large InnoDB table
Posted by: abilash vs
Date: July 19, 2010 12:18PM

Hi,

Please don't mistake me if I am asking the same thing .I understand that MyISAM is designed to perform count(*) in a optimal way.I am also aware of the following fact answered in mysql forum earlier 'Bottom line: Use COUNT(*) unless you are explicitly counting non-null items.'

Under the situation where my table is InnoDB and assume it has quite large number of records,which should i prefer Count(*) or Count(id) from a performance perspective.consider id as the primary key.Are both ok to use in such a case keeping performance in mind ?

Thanks in advance.

Abilash



Edited 1 time(s). Last edit at 07/19/2010 12:21PM by abilash vs.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.