Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 46.7Mb
PDF (A4) - 46.7Mb
PDF (RPM) - 42.1Mb
HTML Download (TGZ) - 10.8Mb
HTML Download (Zip) - 10.8Mb
HTML Download (RPM) - 9.3Mb
Man Pages (TGZ) - 224.3Kb
Man Pages (Zip) - 329.6Kb
Info (Gzip) - 4.2Mb
Info (Zip) - 4.2Mb
Excerpts from this Manual

MySQL 8.0 Reference Manual  /  ...  /  The ps_is_consumer_enabled() Function

27.4.5.10 The ps_is_consumer_enabled() Function

Returns YES or NO to indicate whether a given Performance Schema consumer is enabled, or NULL if the argument is NULL. If the argument is not a valid consumer name, an error occurs. (Prior to MySQL 8.0.18, the function returns NULL if the argument is not a valid consumer name.)

This function accounts for the consumer hierarchy, so a consumer is not considered enabled unless all consumers on which depends are also enabled. For information about the consumer hierarchy, see Section 26.4.7, “Pre-Filtering by Consumer”.

Parameters
  • in_consumer VARCHAR(64): The name of the consumer to check.

Return Value

An ENUM('YES','NO') value.

Example
mysql> SELECT sys.ps_is_consumer_enabled('thread_instrumentation');
+------------------------------------------------------+
| sys.ps_is_consumer_enabled('thread_instrumentation') |
+------------------------------------------------------+
| YES                                                  |
+------------------------------------------------------+