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_disable_thread() Procedure

30.4.4.7 PS_Setup_Disable_Thread过程

根据连接ID,禁用性能Schema的线程instrumentation。生成结果集,指示禁用了多少个线程。已经禁用的线程不计入统计。

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

根据连接ID禁用特定的连接:

mysql> CALL sys.ps_setup_disable_thread(225);
+-------------------+
| summary           |
+-------------------+
| Disabled 1 thread |
+-------------------+

禁用当前连接:

mysql> CALL sys.ps_setup_disable_thread(CONNECTION_ID());
+-------------------+
| summary           |
+-------------------+
| Disabled 1 thread |
+-------------------+