码迷,mamicode.com
首页 > 其他好文 > 详细

5.1中repair table

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

标签:io   ar   for   art   on   c   ef   sql   type   

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

标签:io   ar   for   art   on   c   ef   sql   type   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!