## 28.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 27.4.7, “Pre-Filtering by Consumer” . 

## Parameters 

## Return Value 

## Example 

## 28.4.5.11 The ps_is_instrument_default_enabled() Function 

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

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

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

Returns YES  or NO  to indicate whether a given Performance Schema instrument is enabled by default. 

## Parameters 

## Return Value 

## Example 

• in_instrument VARCHAR(128) : The name of the instrument to check. 

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

mysql> SELECT sys.ps_is_instrument_default_enabled(’memory/innodb/row_log_buf’); +-------------------------------------------------------------------+ | sys.ps_is_instrument_default_enabled(’memory/innodb/row_log_buf’) | +-------------------------------------------------------------------+ | NO | +-------------------------------------------------------------------+ mysql> SELECT sys.ps_is_instrument_default_enabled(’statement/sql/alter_user’); +------------------------------------------------------------------+ | sys.ps_is_instrument_default_enabled(’statement/sql/alter_user’) | +------------------------------------------------------------------+ | YES | +------------------------------------------------------------------+ 

## 28.4.5.12 The ps_is_instrument_default_timed() Function 

Returns YES  or NO  to indicate whether a given Performance Schema instrument is timed by default. 

## Parameters 

• in_instrument VARCHAR(128) : The name of the instrument to check. 

