MySQL刪除大表時潛在的問題(drop table,truncate table)


 

來源於:https://www.cnblogs.com/CtripDBA/p/11465315.html,侵刪,純截圖,避免吸引流量之嫌

case1,刪除大表時,因為清理自適應hash索引占用的內容導致的MySQL服務掛起

 

 

 


 

來源:https://keithlan.github.io/2018/03/27/truncate_drop/ 

case2,大表的隨意Drop或者truncate導致MySQL服務的掛起

按照本文中的結論就是

MySQL5.6版本以下:使用truncate table + drop table 替代 drop table

MySQL5.6版本+ : 直接使用drop table

On a system with a large InnoDB buffer pool and innodb_adaptive_hash_index enabled,
TRUNCATE TABLE operations may cause a temporary drop in system performance due to an LRU scan that occurs when removing an InnoDB table's adaptive hash index entries.
The problem was addressed for DROP TABLE in MySQL 5.5.23 (Bug #13704145, Bug #64284) but remains a known issue for TRUNCATE TABLE (Bug #68184).

 

 

葉問中的解決辦法

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM