MySQL查找SQL耗时瓶颈 SHOW profiles
来源:互联网 发布:oracle数据库跟踪工具 编辑:程序博客网 时间:2024/05/22 09:41
1、首先查看是否开启profiling功能
- SHOW VARIABLES LIKE '%pro%';
或者
- SELECT @@profiling;
2、开启profiling
- SET profiling=1;
3、执行sql语句
例如:
- SELECT
- table_schema AS 'Db Name',
- ROUND( SUM( data_length + index_length ) / 1024 / 1024, 3 ) AS 'Db Size (MB)',
- ROUND( SUM( data_free ) / 1024 / 1024, 3 ) AS 'Free Space (MB)'
- FROM information_schema.tables
- GROUP BY table_schema ;
4、查看结果
- SHOW profiles;
- SHOW profile ALL FOR QUERY 94;
94是查询ID号。
SHOW profiles语法:
- SHOW PROFILE [type [, type] … ]
- [FOR QUERY n]
- [LIMIT row_count [OFFSET offset]]
- type:
- ALL
- | BLOCK IO
- | CONTEXT SWITCHES
- | CPU
- | IPC
- | MEMORY
- | PAGE FAULTS
- | SOURCE
- | SWAPS
0 0
- MySQL查找SQL耗时瓶颈 SHOW profiles
- MySQL查找SQL耗时瓶颈 SHOW profiles
- show profiles 分析sql耗时瓶颈
- MySQL分析SQL耗时瓶颈
- mysql show profiles 使用分析sql 性能
- mysql show profiles 使用分析sql 性能
- mysql show profiles使用分析sql性能
- mysql show profiles 使用分析sql 性能
- mysql show profiles 查看sql语句性能
- mysql show profiles 使用分析sql 性能
- MySQL Error :SHOW PROFILES
- MySQL Query Profiler 的使用 show profiles
- Mysql动态打开日志 show profiles详细信息
- MYSQL性能分析之show profiles
- MySQL性能分析语句 show profile/show profiles
- MySQL profiling 查找Query瓶颈
- mysql中的show profiles在5.6.14版本被丢弃
- mysql运维与分析-性能分析工具-show profiles
- 利用java实现一个简单的远程监控程序
- 昌超给的top适配 3x 代码
- iOS5系统API和5个开源库的JSON解析速度测试
- 读书笔记_java设计模式深入研究 第三章 工厂模式 Factory
- C读txt到二维数组
- MySQL查找SQL耗时瓶颈 SHOW profiles
- 虚拟机中装(重装)VMWare_Tools
- HTTP协议分析系列(三)------HTTP协议方法和状态码
- Windows下用Putty管理VMware Workstation 虚拟机中安装的Ubuntu12.04 LTS
- HDU 2594
- js实现瀑布流
- 向C语言致敬,码农最后的遮羞布。
- 新浪新闻评论系统的架构演进和经验总结
- C++读取文本文件中以TAB作为分隔符,且中间字段有为空的情况的方法?