当前位置: 代码迷 >> 综合 >> Table does not support optimize, doing recreate + analyze instead
  详细解决方案

Table does not support optimize, doing recreate + analyze instead

热度:38   发布时间:2024-01-18 06:40:28.0

        在清理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对其它表类型起作用。

  相关解决方案