Documentation Home
MySQL 8.4 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 39.8Mb
PDF (A4) - 39.9Mb
Man Pages (TGZ) - 257.9Kb
Man Pages (Zip) - 364.9Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 8.4 Reference Manual  /  ...  /  The ps_setup_enable_thread() Procedure

30.4.4.11 The ps_setup_enable_thread() Procedure

根据连接ID启用性能Schema性能监控。结果集显示启用的线程数量。已经启用的线程不计算。

  • in_connection_id BIGINT: 连接ID。这是性能Schemathreads表的PROCESSLIST_ID列或SHOW PROCESSLIST输出的Id列的值。

使用连接ID启用特定的连接:

mysql> CALL sys.ps_setup_enable_thread(225);
+------------------+
| summary          |
+------------------+
| Enabled 1 thread |
+------------------+

启用当前连接:

mysql> CALL sys.ps_setup_enable_thread(CONNECTION_ID());
+------------------+
| summary          |
+------------------+
| Enabled 1 thread |
+------------------+