mysql中的show profiles在5.6.14版本被丢弃
2014-01-05 11:10
330 查看
mysql> status
————–
mysql Ver 14.14 Distrib 5.6.14, for Linux (x86_64) using EditLine wrapper
mysql> show variables like ‘%profil%’;
+————————+——-+
| Variable_name | Value |
+————————+——-+
| have_profiling | YES |
| profiling | OFF |
| profiling_history_size | 15 |
+————————+——-+
3 rows in set (0.00 sec)
该功能默认是关闭的
mysql> set profiling=1
-> ;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> show warnings\G
*************************** 1. row ***************************
Level: Warning
Code: 1287
Message: ‘SHOW PROFILE’ is deprecated and will be removed in a future release. Please use Performance Schema instead
1 row in set (0.00 sec)
mysql> select count(*) from openfire.ofUser;
mysql> show profile for query 2;
+———————-+———-+
| Status | Duration |
+———————-+———-+
| starting | 0.000046 |
| checking permissions | 0.000006 |
| Opening tables | 0.000017 |
| init | 0.000014 |
| System lock | 0.000009 |
| optimizing | 0.000006 |
| statistics | 0.000013 |
| preparing | 0.000011 |
| executing | 0.000003 |
| Sending data | 0.000049 |
| end | 0.000005 |
| query end | 0.000006 |
| closing tables | 0.000009 |
| freeing items | 0.000013 |
| logging slow query | 0.000069 |
| cleaning up | 0.000016 |
+———————-+———-+
16 rows in set, 1 warning (0.00 sec)
官方建议使用information_schema.profiling。原因是show profile 输出了查询执行的每个步骤及其花费的时间,但是结果很难快速确定哪个步骤花费的时间最多,因为输出是按照执行顺序排序的,而不是按花费的时间排序—-而时间上我们更关心的是花费了多少时间。
————–
mysql Ver 14.14 Distrib 5.6.14, for Linux (x86_64) using EditLine wrapper
mysql> show variables like ‘%profil%’;
+————————+——-+
| Variable_name | Value |
+————————+——-+
| have_profiling | YES |
| profiling | OFF |
| profiling_history_size | 15 |
+————————+——-+
3 rows in set (0.00 sec)
该功能默认是关闭的
mysql> set profiling=1
-> ;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> show warnings\G
*************************** 1. row ***************************
Level: Warning
Code: 1287
Message: ‘SHOW PROFILE’ is deprecated and will be removed in a future release. Please use Performance Schema instead
1 row in set (0.00 sec)
mysql> select count(*) from openfire.ofUser;
mysql> show profile for query 2;
+———————-+———-+
| Status | Duration |
+———————-+———-+
| starting | 0.000046 |
| checking permissions | 0.000006 |
| Opening tables | 0.000017 |
| init | 0.000014 |
| System lock | 0.000009 |
| optimizing | 0.000006 |
| statistics | 0.000013 |
| preparing | 0.000011 |
| executing | 0.000003 |
| Sending data | 0.000049 |
| end | 0.000005 |
| query end | 0.000006 |
| closing tables | 0.000009 |
| freeing items | 0.000013 |
| logging slow query | 0.000069 |
| cleaning up | 0.000016 |
+———————-+———-+
16 rows in set, 1 warning (0.00 sec)
官方建议使用information_schema.profiling。原因是show profile 输出了查询执行的每个步骤及其花费的时间,但是结果很难快速确定哪个步骤花费的时间最多,因为输出是按照执行顺序排序的,而不是按花费的时间排序—-而时间上我们更关心的是花费了多少时间。
相关文章推荐
- mysql show profiles 使用分析sql 性能
- mysql show profiles 使用分析sql 性能
- mysql show profiles 查看sql语句性能
- MySQL性能分析语句 show profile/show profiles
- MySQL查找SQL耗时瓶颈 SHOW profiles
- mysql show profiles使用分析sql性能
- MySQL Error :SHOW PROFILES
- mysql show profiles使用分析sql性能
- mysql show profiles 使用分析sql 性能
- mysql show profiles 使用分析sql 性能
- mysql show profiles 使用分析sql 性能
- MySQL性能分析语句 show profile/show profiles
- MySQL查找SQL耗时瓶颈 SHOW profiles
- SHOW PROFILES Syntax(MySql)
- MySQL Error :SHOW PROFILES
- mysql show profiles 使用分析sql 性能
- show profiles 查看MySQL语句的执行时间
- MYSQL性能分析之show profiles
- MySQL查找SQL耗时瓶颈SHOW profiles
- MySQL性能分析语句 show profile/show profiles