Bug #37974 To regenerate table statistics ... issue a CHECK TABLE statement
Submitted: 8 Jul 2008 17:12 Modified: 8 Jul 2008 17:19
Reporter: Sergei Golubchik Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[8 Jul 2008 17:12] Sergei Golubchik
Description:
The page http://dev.mysql.com/doc/refman/5.1/en/myisam-index-statistics.html recommends
"
 To regenerate table statistics, you can use any of the following methods:

    * Set myisam_stats_method, and then issue a CHECK TABLE statement
"

It should not do it. CHECK TABLE is documented (on its own page) as "CHECK TABLE checks a table or tables for errors." The fact that it regenerates table statistics for MyISAM is a side-effect - it does it because it comes at no cost during the checking. There's no guarantee that it will always do that. And the manual should not promote this usage of CHECK TABLE.

How to repeat:
.
[8 Jul 2008 17:19] 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 products.