show profile进行sql分析
来源:互联网 发布:黑马程序员就业班教程 编辑:程序博客网 时间:2024/06/05 22:55
出于性能的考虑mysql默认时关闭了该功能的,可以通过如下的方式打开:
mysql> set profiling=on;
随便执行几条sql:
mysql> select * from emp limit 10,10;
mysql> select * from emp group by id%10 limit 150000;
mysql> select * from emp group by id%20 limit 5;
执行
mysql> show profiles;
可以看到前面执行的sql全部被打印出来了
11条语句比较坑爹,执行比较慢,不妨拎出来做一些分析
mysql> show profile cpu,block io for query 11;
发现,创建临时表等耗时操作
tips:
如果有一下的一些操作表明这条sql比较坑爹:
1.converting HEAP to MyISAM
2.Creating tmp table
3.Copying to tmp table on disk
4.locked
这时候就应该针对这条sql进行一些调优工作了。
阅读全文
0 0
- show profile进行sql分析
- Show Profile进行sql分析
- MySql 使用SHOW PROFILE 进行SQL 分析
- MySql 使用SHOW PROFILE 进行SQL 分析
- show profile sql分析的好工具
- show profile 分析性能
- 使用show profile分析单条查询
- mysql性能分析工具--show profile
- mysql查询性能分析(show status,show profile,explain)
- MySQL性能分析语句 show profile/show profiles
- show profile;
- mysql性能分析工具show profile(翻译)
- mysql -> show profile ;
- mysql的show profile
- SHOW PROFILE参数
- show profile的使用
- mysql show profile
- mysql show profile
- jsp
- jQuery实现复选框单选
- 项目实训——第一周(1)
- 简单、原生的jedis环境搭建
- Windows进程间的通信-命名管道
- show profile进行sql分析
- ES7的Async/Await 异步
- Python模块导入错误分析
- 快速理解和使用 ES7 await/async
- 51单片机之IIC通信学习总结
- 有序广播
- ExpandableListView的使用解析
- 滑动窗口中求最大值
- 机器学习&深度学习研究者最重要的11张速查表