MySQL删除大表时潜在的问题(drop table,truncate table)

 

来源于:http://www.javashuo.com/article/p-tagtgwqy-k.html,侵删,纯截图,避免吸引流量之嫌html

case1,删除大表时,由于清理自适应hash索引占用的内容致使的MySQL服务挂起git

 

 

 


 

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

case2,大表的随意Drop或者truncate致使MySQL服务的挂起spa

按照本文中的结论就是3d

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

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

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).

 

 

叶问中的解决办法blog

相关文章
相关标签/搜索