content_image/870834.jpg content_image/870835.jpg content_image/870836.jpg
## 28.4.4.9 The ps_setup_enable_consumer() Procedure 

mysql> CALL sys.ps_setup_enable_background_threads(); 

<img src='content_image/870834.jpg'>

Enables Performance Schema consumers with names that contain the argument. Produces a result set indicating how many consumers were enabled. Already enabled consumers do not count. 

## Parameters 

• consumer VARCHAR(128) : The value used to match consumer names, which are identified by using %consumer%  as an operand for a LIKE  pattern match. 

## Example 

## 28.4.4.10 The ps_setup_enable_instrument() Procedure 

A value of ’’  matches all consumers. 

## Enable all statement consumers: 

mysql> CALL sys.ps_setup_enable_consumer(’statement’); 

<img src='content_image/870835.jpg'>

Enables Performance Schema instruments with names that contain the argument. Produces a result set indicating how many instruments were enabled. Already enabled instruments do not count. 

## Parameters 

• in_pattern VARCHAR(128) : The value used to match instrument names, which are identified by using %in_pattern%  as an operand for a LIKE  pattern match. 

## Example 

A value of ’’  matches all instruments. 

## Enable a specific instrument: 

mysql> CALL sys.ps_setup_enable_instrument(’wait/lock/metadata/sql/mdl’); 

<img src='content_image/870836.jpg'>

## Enable all mutex instruments: 

mysql> CALL sys.ps_setup_enable_instrument(’mutex’); +-------------------------+ 

