myisamchk supports the following options for table checking operations:myisamchk支持以下表检查操作选项:
--check
, -c
Check the table for errors. This is the default operation if you specify no option that selects an operation type explicitly.检查表格是否有错误。如果未指定明确选择操作类型的选项,则这是默认操作。
Check only tables that have changed since the last check.仅检查自上次检查以来发生更改的表。
--extend-check
, -e
Check the table very thoroughly. This is quite slow if the table has many indexes. This option should only be used in extreme cases. 仔细检查桌子。如果表有很多索引,这会很慢。此选项仅应在极端情况下使用。Normally, myisamchk or myisamchk --medium-check should be able to determine whether there are any errors in the table.通常,myisamchk或myisamchk --media-check应该能够确定表中是否有任何错误。
If you are using 如果您正在使用--extend-check
and have plenty of memory, setting the key_buffer_size
variable to a large value helps the repair operation run faster.--extend-check
并且有足够的内存,将key_buffer_size
变量设置为较大的值有助于修复操作更快地运行。
See also the description of this option under table repair options.另请参阅表修复选项下此选项的说明。
For a description of the output format, see Section 4.6.4.5, “Obtaining Table Information with myisamchk”.有关输出格式的说明,请参阅第4.6.4.5节,“使用myisamchk获取表信息”。
--fast
, -F
Check only tables that haven't been closed properly.只检查未正确关闭的桌子。
--force
, -f
Do a repair operation automatically if myisamchk finds any errors in the table. 如果myisamchk在表中发现任何错误,则自动执行修复操作。The repair type is the same as that specified with the 修复类型与使用--recover
or -r
option.--recover
或-r
选项指定的修复类型相同。
--information
, -i
Print informational statistics about the table that is checked.打印有关所检查表的信息统计信息。
--medium-check
, -m
Do a check that is faster than an 执行比--extend-check
operation. This finds only 99.99% of all errors, which should be good enough in most cases.--extend-check
操作更快的检查。这只发现了99.99%的错误,在大多数情况下应该已经足够好了。
--read-only
, -T
Do not mark the table as checked. This is useful if you use myisamchk to check a table that is in use by some other application that does not use locking, such as mysqld when run with external locking disabled.不要将表格标记为已选中。如果您使用myisamchk检查其他不使用锁定的应用程序(如禁用外部锁定运行时的mysqld)正在使用的表,这将非常有用。
--update-state
, -U
Store information in the 将信息存储在.MYI
file to indicate when the table was checked and whether the table crashed. .MYI
文件中,以指示表何时被检查以及表是否崩溃。This should be used to get full benefit of the 这应该用于获得--check-only-changed
option, but you shouldn't use this option if the mysqld server is using the table and you are running it with external locking disabled.--check-only-changed
选项的全部好处,但如果mysqld服务器正在使用该表,并且您在禁用外部锁定的情况下运行它,则不应该使用此选项。