线上一个数据库,高并发的。
show processlist 常看到States状态里有很多的 show full columns 和 chekcing privileges;
实验验证下:
use queues;
set profiling = 1;
show full columns from queuing_wx_qr_table ;
show profiles;
<a href="https://s2.51cto.com/wyfs02/M00/9A/F2/wKiom1lcgmKR8w__AACEt3wtV-M735.png" target="_blank"></a>
原因:
因为show full columns from table_xxx 展示的结果中会列出Privileges列的情况,表里有多少列就会出现多少次checking permissions检查。
show full columns from xxx 这个语句会不会造成性能影响,不确定,没找到相关博客。
本文转自 lirulei90 51CTO博客,原文链接:http://blog.51cto.com/lee90/1944722,如需转载请自行联系原作者