ps_setup_enable_thread()过程
给定一个连接ID,为该线程启用Performance Schema检测。产生一个结果集,指示启用了多少个线程。已启用的线程不计算在内。
参量
in_connection_id BIGINT
:连接ID。这是PROCESSLIST_ID
在性能模式threads
表的Id
列或SHOW PROCESSLIST
输出的列中给定的类型的值。
例
通过连接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 | +------------------ +