mysql碎片整理相關

查看碎片

use information_schema;

select TABLE_SCHEMA,TABLE_NAME,data_free,engine from tables where engine in ('myisam','innodb') data_free>0;

  

1、myisam存儲引擎清理碎片方法

OPTIMIZE TABLE  table_name

2、innodb存儲引擎清理碎片方法

ALTER TABLE tablename ENGINE=InnoDB

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章