Show Profile进行sql分析
来源:互联网 发布:日本人的气质 知乎 编辑:程序博客网 时间:2024/06/02 02:44
Show Profile进行sql分析
一.Show Profile是什么
是mysql提供的用来分析当前会话中sql执行的资源消耗情况,比explain粒度更细的sql调优手段。
二.查看该参数是否开启以及如何开启
1.查看该参数是否开启
show VARIABLES like 'profiling';
2.开启
默认是关闭的,现在开启。
set profiling = 1;
三.sql分析
1.在数据库中运行一些sql
2.查看这些sql运行状况
show PROFILES;
3.具体sql的细化分析
show profile cpu,block io for query 10;
query_id为10的查询语句的完整的执行过程我们都能够看到,就可以具体分析如果sql执行过慢到底是什么原因导致的。
四.sql执行完整过程中可能出现的问题
1.converting HEAP to MyISAM
查询结果太大,内存不够往磁盘上搬。
2.Creating tmp table
创建了临时表
3.Coping to tmp table on disk
把内存中临时表复制到磁盘
4.locked
加锁
阅读全文
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
- CString与char之间的转换
- Oracle Exception:missing right parenthesis
- Leetcode解题笔记 62. Unique Paths [Medium] 动态规划
- freeline使用入门
- OJ 1874: 我爱数学
- Show Profile进行sql分析
- 切片上传
- Hopfield-数字识别
- AnyState
- http协议
- vim中buffer、windows和tab的概念
- 使用python、numpy线性回归
- python生成随机测试文件
- 小项目——2048小游戏