All pages
Powered by GitBook
1 of 1

Loading...

ps_is_consumer_enabled

This function returns YES or NO indicating whether a specific consumer is currently enabled in the Performance Schema.

Syntax

sys.ps_is_consumer_enabled(consumer)

Description

ps_is_consumer_enabled is a available with the .

It returns an ENUM('YES','NO') depending on whether Performance Schema instrumentation for the given consumer is enabled, and NULL if not given a valid consumer name.

Examples

See Also

This page is licensed: CC BY-SA / Gnu FDL

stored function
Sys Schema
Performance Schema setup_consumers Table
SELECT sys.ps_is_consumer_enabled('global_instrumentation');
+------------------------------------------------------+
| sys.ps_is_consumer_enabled('global_instrumentation') |
+------------------------------------------------------+
| YES                                                  |
+------------------------------------------------------+

SELECT sys.ps_is_consumer_enabled('events_stages_current');
+-----------------------------------------------------+
| sys.ps_is_consumer_enabled('events_stages_current') |
+-----------------------------------------------------+
| NO                                                  |
+-----------------------------------------------------+

SELECT sys.ps_is_consumer_enabled('nonexistent_consumer');
+----------------------------------------------------+
| sys.ps_is_consumer_enabled('nonexistent_consumer') |
+----------------------------------------------------+
| NULL                                               |
+----------------------------------------------------+

Sys Schema is available from MariaDB 10.6.