Question: 22
Consider the CHECK TABLE command.
In which two situations should this command be used? (Choose two.)
A. to find out why a query takes a long time to execute on a given table
B. to make sure a table has no structural problems
C. to improve performance by updating index distributing statistics on InnoDB tables
D. to repair table structure problem
E. to make sure that no table indexes are corrupted
解析:
CHECK TABLE checks a table or tables for errors. For MyISAM tables, the key statistics are updated as well. CHECK TABLEcan also check views for problems, such as tables that are referenced in the view definition that no longer exist.
不能定位性能问题,A错
CHECK TABLE updates key statistics for MyISAM tables. ,但是innoDB不行,C错
If CHECK TABLE output does not return OK or Table is already up to date, you should normally run a repair of the table. See Section 7.6, “MyISAM Table Maintenance and Crash Recovery”. 不能自动修复 D错误
If CHECK TABLE encounters errors in InnoDB tables or indexes, it reports an error, and usually marks the index and sometimes marks the table as corrupted,可见是可以检测index错误
Answer: B,E