MySQL Forums
Forum List  »  Performance

Re: Count massively faster than select on same query, why?!?!
Posted by: Bob Field
Date: August 03, 2006 03:21PM

count(*) can count the rows using the index only. Especially in MyISAM tables, this means the MYD file didn't have to be opened, and provides a substantial performance increase. In your case the biggest expense is not satisfying the WHERE clause but actually retrieving the data.

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.