首页 > 其他 > 详细

5.1中repair table

时间:2014-09-07 17:12:15      阅读:238      评论:0      收藏:0      [点我收藏+]

mysql> repair table xs;
+---------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+---------+--------+----------+----------+
| lina.xs | repair | status | OK |
+---------+--------+----------+----------+
1 row in set (0.00 sec)

mysql> show profiles;
+----------+------------+-----------------------------------------------------+
| Query_ID | Duration | Query |
+----------+------------+-----------------------------------------------------+
| 1 | 0.00469700 | alter table xs modify age int not null default 3 |
| 2 | 0.00023300 | drop table xs |
| 3 | 0.00527100 | create table xs(name varchar(12),age int default 5) |
| 4 | 0.00030300 | insert into xs values(‘a‘,4) |
| 5 | 0.00403400 | alter table xs alter column age set default 3 |
| 6 | 0.00088200 | repair table xs |
+----------+------------+-----------------------------------------------------+
6 rows in set (0.00 sec)

mysql> show profile for query 6;
+----------------------+----------+
| Status | Duration |
+----------------------+----------+
| starting | 0.000151 |
| Opening tables | 0.000024 |
| System lock | 0.000008 |
| Table lock | 0.000034 |
| Repair with keycache | 0.000533 |
| Saving state | 0.000112 |
| query end | 0.000004 |
| freeing items | 0.000014 |
| cleaning up | 0.000002 |
+----------------------+----------+
9 rows in set (0.00 sec)

5.1中repair table

原文:http://www.cnblogs.com/lehao/p/3960524.html

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