MYSQL 碎片清理

統計碎片表:

#切換至mysql數據庫。
select table_schema db,
       table_name,
       data_free,
       engine
  from information_schema.tables
 where table_schema not in('information_schema', 'mysql')
   and data_free> 0 ORDER BY data_free DESC ;

優化表:

OPTIMIZE TABLE `oc_xxx_news`

查看整理完成情況:

show processlist;

 

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