ps_setup_show_disabled_instruments() - xiaoboluo768/mysql-system-schema GitHub Wiki
-
查看当前performance_schema中禁用的instruments配置,通过查询performance_schema.setup_instruments表enabled字段为NO的值实现,执行时无需任何传入参数,返回的instruments列表可能比较长
-
定义语句
DROP PROCEDURE IF EXISTS ps_setup_show_disabled_instruments;
DELIMITER $$
CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_show_disabled_instruments ()
COMMENT '
Description
-----------
Shows all currently disabled instruments.
Parameters
-----------
None
Example
-----------
mysql> CALL sys.ps_setup_show_disabled_instruments();
'
SQL SECURITY INVOKER
DETERMINISTIC
READS SQL DATA
BEGIN
SELECT name AS disabled_instruments, timed
FROM performance_schema.setup_instruments
WHERE enabled = 'NO'
ORDER BY disabled_instruments;
END$$
DELIMITER ;
上一篇: ps_setup_show_disabled_consumers()存储过程 | 下一篇: ps_setup_show_enabled()存储过程