时间:2021-07-01 10:21:17 帮助过:4人阅读
OPTIMIZE TABLE TableName; -- 优化表碎片(会锁表,数据量大的表执行时间相对较长)
show table status from database_test like ‘TableName‘; -- 查询表状态
SELECT table_schema,TABLE_NAME , concat(data_free/1024/1024,"M") FROM `information_schema`.tables WHERE data_free >8*1024*1024 AND ENGINE =‘innodb‘ ORDER BY data_free DESC; -- 查询表碎片空间占用较大的表
Mysql表的碎片整理和空间回收
标签:mysq 占用 free 状态 table form ase 24* tab