MySQL随笔
mysql> show table status like ‘user‘\G
*************************** 1. row ***************************
Name: user
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 5
Avg_row_length: 3276
Data_length: 16384
Max_data_length: 0
Index_length: 0
Data_free: 0
Auto_increment: 6
Create_time: 2014-10-10 13:19:53
Update_time: NULL
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.00 sec)
mysql> check table user;
+----------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+----------------+-------+----------+----------+
| isso_test.user | check | status | OK |
+----------------+-------+----------+----------+
1 row in set (0.10 sec)
mysql> repair table user\G
*************************** 1. row ***************************
Table: test.user
Op: repair
Msg_type: note
Msg_text: The storage engine for the table doesn‘t support repair
1 row in set (0.27 sec)
如果数据库已经关闭,可以用myisamchk命令来检测和修复
可以使用myisampack对MyISAM对数据表进行压缩,可以减少I/O提高性能,后果是只读,不可修改表数据,读取表数据是解压也需要开销,这部分开销影响很小
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。