Documentation Home

26.4.5.13 ps_is_thread_instrumented() 函数

返回YESNO以指示是否启用给定连接 ID 的性能模式检测,UNKNOWN如果 ID 未知,或者NULLID 是否为 NULL

参数
  • in_connection_id BIGINT UNSIGNED:连接ID。这是 PROCESSLIST_IDPerformance Schemathreads 表的Id列 或SHOW PROCESSLIST输出列中给出的类型的值。

返回值

一个ENUM('YES','NO','UNKNOWN')值。

例子
Press CTRL+C to copy
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 | +------------------------------------------------+