一个某某库大概W,为了提高查询效率,做点优化,使用optimize table table.name;出现Table does not support optimize, doing recreate + analyze instead 果断谷歌,查到一段E文。。。 Everytime you do optimize MySQL, by using mysqlcheck -A -o or using ./mysql_optimize from here. You may see the output Table does not support optimize, doing recreate + analyze instead. It is because the table that you are using is InnoDB. You can optimize the InnoDB tables by using this. 复制代码代码如下: ALTER TABLE table.name ENGINE='InnoDB'; This will create a copy of the original table, and drop the original table, and replace to the original place. Although this is safe, but I suggest you do backup and test first before doing this. 原来如此,大致意思是说innodb的数据库不支持optimize,可以用 ALTER TABLE table.name ENGINE='InnoDB'; 该方法会对旧表以复制的方式新建一个新表,然后删除旧表。虽然这个过程是安全的,但是在进行操作时还是先进行备份为好 还有一种方式: You can make OPTIMIZE TABLE work on other storage engines by starting mysqld with the --skip-new or --safe-mode option. In this case, OPTIMIZE TABLE is just mapped toALTER TABLE. 上面是说要求我们在启动的时候指定--skip-new或者--safe-mode选项来支持optimize功能
推荐整理分享optimize table出错解决方法(optimize error by column count),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:select tables optimized away,optimized defaults,optimize table作用,select tables optimized away,optimize table作用,optimize error by column count,table does not support optimize,optimize table作用,内容如对您有帮助,希望把文章链接给更多的朋友!
centOS防火墙iptables的设置教程 1、安装iptables防火墙怎么知道系统是否安装了iptables?执行iptables-V,如果显示如:iptablesv1.3.5说明已经安装了iptables。如果没有安装iptables需要先安装,执
让Centos解压打包RAR的实现方法 有些朋友购买了vps后由于他是从原来的win主机搬迁过来,备份打包的数据是rar格式的,那在centos下怎么解压呢?Goole一下,找到解决办法:复制代码代码
在CentOS 6.3中安装与配置JDK-7 安装说明系统环境:centos-6.3安装方式:rpm安装软件:jdk-7-linux-x.rpm下载地址: