MySQL 8.3 Release Notes
返回 YES 或 NO,以指示给定连接 ID 的性能模式仪表是否启用,UNKNOWN 如果 ID 未知,或者 NULL 如果 ID 为 NULL。
-
in_connection_id BIGINT UNSIGNED:连接 ID。这是性能模式threads表的PROCESSLIST_ID列或SHOW PROCESSLIST输出的Id列的值。
mysql> SELECT sys.ps_is_thread_instrumented(43);
+-----------------------------------+
| sys.ps_is_thread_instrumented(43) |
+-----------------------------------+
| UNKNOWN |
+-----------------------------------+
mysql> SELECT sys.ps_is_thread_instrumented(CONNECTION_ID());
+------------------------------------------------+
| sys.ps_is_thread_instrumented(CONNECTION_ID()) |
+------------------------------------------------+
| YES |
+------------------------------------------------+