MySQL 无法优化 innoDB 表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3855489/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can't optimize innoDB table
提问by syndrael
As my first message here, i don't know if i have to answer or post a new message. I have the same problem as hereand the one and only given answer doesn't help me (except if the documentation is incorrect). "You can make OPTIMIZE TABLE work on other storage engines", but my engine is InnoDB. I thank you for your help. S.
作为我在这里的第一条消息,我不知道我是否必须回答或发布新消息。我和这里有同样的问题,唯一给出的答案对我没有帮助(除非文档不正确)。“您可以让 OPTIMIZE TABLE 在其他存储引擎上工作”,但我的引擎是 InnoDB。我感谢你的帮助。S。
回答by Ike Walker
OPTIMIZE TABLE works fine on InnoDB tables. The message that says "Table does not support optimize, doing recreate + analyze instead" is purely informational. You can safely ignore that message.
OPTIMIZE TABLE 在 InnoDB 表上工作正常。显示“表不支持优化,而是进行重新创建 + 分析”的消息纯粹是信息性的。您可以放心地忽略该消息。
回答by Joe
You cannot IGNORE the result... that means its doing a VERY intensive operation instead of a light one... one a very large table (>100G) this could be hours instead of minutes.
你不能忽略结果......这意味着它在做一个非常密集的操作而不是一个轻量级的操作......一个非常大的表(> 100G)这可能是几个小时而不是几分钟。
回答by hhs
use this
用这个
ALTER TABLE table ENGINE='InnoDB';

