gpt4 book ai didi

mysql - show profiles 不显示查询

转载 作者:行者123 更新时间:2023-11-30 23:39:03 24 4
gpt4 key购买 nike

大家好。有人可以解释为什么 show profiles 不显示查询吗?这是我尝试的输出:

mysql> set profiling = 1;
Query OK, 0 rows affected (0.00 sec)

mysql> use slow;
Database changed
mysql> show profiles;
+----------+------------+-------------------+
| Query_ID | Duration | Query |
+----------+------------+-------------------+
| 1 | 0.00024275 | SELECT DATABASE() |
+----------+------------+-------------------+
1 row in set (0.00 sec)

mysql> select count(*) from people;
+----------+
| count(*) |
+----------+
| 500000 |
+----------+
1 row in set (0.00 sec)

mysql> show profiles;
+----------+------------+-----------------------------+
| Query_ID | Duration | Query |
+----------+------------+-----------------------------+
| 1 | 0.00024275 | SELECT DATABASE() |
| 2 | 0.00030825 | select count(*) from people |
+----------+------------+-----------------------------+
2 rows in set (0.00 sec)

mysql> select
-> concat_ws('-',min(age(dob)),max(age(dob))) as year,
-> count(*) as total
-> from people
-> group by if(age(dob)=0,1,ceil(age(dob)/5))
-> ;
+---------+-------+
| years | total |
+---------+-------+
| 0-5 | 29789 |
| 6-10 | 24847 |
| 11-15 | 24670 |
| 16-20 | 24764 |
| 21-25 | 24751 |
| 26-30 | 24753 |
| 31-35 | 24817 |
| 36-40 | 24505 |
| 41-45 | 24540 |
| 46-50 | 24745 |
| 51-55 | 24575 |
| 56-60 | 24441 |
| 61-65 | 24953 |
| 66-70 | 24760 |
| 71-75 | 24586 |
| 76-80 | 24647 |
| 81-85 | 24819 |
| 86-90 | 24879 |
| 91-95 | 24683 |
| 96-100 | 24829 |
| 101-101 | 647 |
+---------+-------+
21 rows in set (31.42 sec)

mysql> show profiles;
+----------+------------+-----------------------------+
| Query_ID | Duration | Query |
+----------+------------+-----------------------------+
| 1 | 0.00024275 | SELECT DATABASE() |
| 2 | 0.00030825 | select count(*) from people |
+----------+------------+-----------------------------+
2 rows in set (0.00 sec)

提前致谢。

最佳答案

我也找不到任何引用,所以认为这是一个错误:

http://bugs.mysql.com/bug.php?id=61328

关于mysql - show profiles 不显示查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5036780/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com