![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MYSQL SQL优化
WarriorTan
这个作者很懒,什么都没留下…
展开
-
利用performance_schema数据库查看SQL资源统计
1.修改数据字典以启用相关事件 mysql> use performance_schema mysql> show tables like 'setup%'; +---------------------------------------+ | Tables_in_performance_schema (setup%) | +---------------------------...原创 2020-02-15 20:11:11 · 498 阅读 · 0 评论 -
利用show profiles 和 show profile查询SQL语句的资源统计
一般用于会话级,用于收集SQL语句的资源使用情况。 1.首先要设置系统变量profiling为on(作用于当前会话): mysql> show variables like 'profiling%'; +------------------------+-------+ | Variable_name | Value | +-------------------...原创 2020-02-15 19:41:14 · 560 阅读 · 0 评论