Bug #8364 innodb count(*) description, "table" should be "index"
Submitted: 8 Feb 2005 5:44 Modified: 8 Feb 2005 16:36
Reporter: James Day Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S4 (Feature request)
Version: OS:
Assigned to: Paul DuBois CPU Architecture:Any

[8 Feb 2005 5:44] James Day
Description:
At http://dev.mysql.com/doc/mysql/en/innodb-restrictions.html :

"To process a SELECT COUNT(*) FROM T statement, InnoDB must scan an index of the table, which will take some time if the table is not entirely in the buffer pool."

How to repeat:
View the documentation page at the supplied URL. If necessary, confirm by trying a select which loads a table into the buffer pool, then doing a count(field in non-clustered index) twice. Observe that having the clustered index in the buffer pool didn't help the first indexed query but the second was helped by the preloading from the first.

Suggested fix:
It's the index which needs to be in the buffer pool, not the table.
[8 Feb 2005 8:53] Heikki Tuuri
James,

a good observation :). I am assigning this to Paul.

Thank you,

Heikki
[8 Feb 2005 16:36] Paul DuBois
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).

Additional info:

Thanks for the report.