首页 > 数据库技术 > 详细

MySQL随笔

时间:2015-03-26 12:46:30      阅读:217      评论:0      收藏:0      [点我收藏+]

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提高性能,后果是只读,不可修改表数据,读取表数据是解压也需要开销,这部分开销影响很小

 

MySQL随笔

原文:http://www.cnblogs.com/jiaxu/p/4368191.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!