ITPub博客

首页 > 数据库 > MySQL > freeing items

freeing items

原创 MySQL 作者:哎呀我的天呐 时间:2020-04-22 22:59:00 0 删除 编辑
(福利推荐:【腾讯云】服务器最新限时优惠活动,云服务器1核2G仅99元/年、2核4G仅768元/3年,立即抢购>>>:9i0i.cn/qcloud
(福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun



show processlist 查看到大量的 freeing items状态会话


查看官方文档,官方文档在 8.14.2 General Thread States章节给出了线程状态的解释

说明命令已经在执行正在进行清理 更新日志索引等


mysql> SELECT @@profiling;
+-------------+
| @@profiling |
+-------------+
|           0 |
+-------------+
1 row in set (0.00 sec)
mysql> SET profiling = 1;
Query OK, 0 rows affected (0.00 sec)
mysql> DROP TABLE IF EXISTS t1;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> CREATE TABLE T1 (id INT);
Query OK, 0 rows affected (0.01 sec)
mysql> SHOW PROFILES;
+----------+----------+--------------------------+
| Query_ID | Duration | Query |
+----------+----------+--------------------------+
|        0 | 0.000088 | SET PROFILING = 1 |
|        1 | 0.000136 | DROP TABLE IF EXISTS t1 |
|        2 | 0.011947 | CREATE TABLE t1 (id INT) |
+----------+----------+--------------------------+
3 rows in set (0.00 sec)
mysql> SHOW PROFILE;
+----------------------+----------+
| Status           |      Duration |
+----------------------+----------+
| checking permissions | 0.000040 |
| creating table | 0.000056 |
| After create | 0.011363 |
| query end | 0.000375 |
| freeing items | 0.000089 |
| logging slow query | 0.000019 |
| cleaning up | 0.000005 |
+----------------------+----------+
7 rows in set (0.00 sec)
mysql> SHOW PROFILE FOR QUERY 1;
+--------------------+----------+
| Status | Duration |
+--------------------+----------+
| query end | 0.000107 |
| freeing items | 0.000008 |
| logging slow query | 0.000015 |
| cleaning up | 0.000006 |
+--------------------+----------+
4 rows in set (0.00 sec)
mysql> SHOW PROFILE CPU FOR QUERY 2;
+----------------------+----------+----------+------------+
| Status             | Duration | CPU_user | CPU_system |
+----------------------+----------+----------+------------+
| checking permissions | 0.000040 | 0.000038 | 0.000002 |
| creating table | 0.000056 | 0.000028 | 0.000028 |
| After create | 0.011363 | 0.000217 | 0.001571 |
| query end | 0.000375 | 0.000013 | 0.000028 |
| freeing items | 0.000089 | 0.000010 | 0.000014 |
| logging slow query | 0.000019 | 0.000009 | 0.000010 |
| cleaning up     | 0.000005 | 0.000003 | 0.000002 |
2662
SHOW Statements
+----------------------+----------+----------+------------+
7 rows in set (0.00 sec)


最后看宿主机的监控状态,load达到了 50多

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29990276/viewspace-2687751/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
LightDB 恒生电子 https://cloud.tencent.com/developer/inventory/14362

注册时间:2014-10-30

  • 博文量
    394
  • 访问量
    2432926


http://www.vxiaotou.com