欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Table does not support optimize, doing recreate + analyze instead

程序员文章站 2022-06-12 22:30:39
...

        在清理mysql数据表后,执行optimize优化和整理文件碎片,Msg_text中提示“表不支持优化,使用重新创建或者分析进行替代”

mysql> optimize table zabbix.history_uint;  
+------------+----------+----------+-------------------------------------------------------------------+  
| Table      | Op       | Msg_type | Msg_text                                                          |  
+------------+----------+----------+-------------------------------------------------------------------+  
| zabbix.history_uint | optimize | note     | Table does not support optimize, doing recreate + analyze instead |  
| zabbix.history_uint | optimize | status   | OK                                                                |  
+------------+----------+----------+-------------------------------------------------------------------+  
2 rows in set (6276.15 sec)  

说明:在默认情况下,对InnoDB引擎表使用optimize table,会提示「 Table does not support optimize, doing recreate + analyze instead」的信息。使用—skip-new或—safe-mode选项启动mysql。就可以使OPTIMIZE TABLE对其它表类型起作用。