在运行mysqltuner之后,我收到了以下输出:
Total fragmented tables: 284为了整理碎片,我尝试了以下方法:
1. ALTER TABLE tbl_name ENGINE=INNODB
2. Another way to perform a defragmentation operation is to use mysqldump to dump the table to a text file, drop the table, and reload it from the dump file.这两种方法都是用MySQL文档描述的。
但所有的方法都没有帮助。Mysqltuner仍然表示表是支离破碎的。
注意:在我的配置中, innodb_file_per_table是关闭的。
如何对InnoDB表进行碎片整理?
发布于 2015-08-24 10:07:15
更改表tbl_name ENGINE=INNODB
是整理无害数据库表的唯一方法。
ALGORITHM=INPLACE可以帮助我们在网上完成它。
发布于 2016-01-26 02:35:49
从MySQL 5.5.11开始,您还可以使用ALTER tbl_name 来执行“null”alter操作来重新构建表。以前,部队选项得到承认,但被忽略。
发布于 2020-10-21 14:04:53
我也有同样的问题,解决方案就是在alter之后做alter。
alter table xyz engine=InnoDB;
analyze table xyz;https://stackoverflow.com/questions/26514073
复制相似问题