• events_ xxx _history_long , where xxx  is waits , stages , statements , transactions 

## 27.4.9 Naming Instruments or Consumers for Filtering Operations 

Names given for filtering operations can be as specific or general as required. To indicate a single instrument or consumer, specify its name in full: 

UPDATE performance_schema.setup_instruments SET ENABLED = ’NO’ WHERE NAME = ’wait/synch/mutex/myisammrg/MYRG_INFO::mutex’; UPDATE performance_schema.setup_consumers SET ENABLED = ’NO’ WHERE NAME = ’events_waits_current’; 

To specify a group of instruments or consumers, use a pattern that matches the group members: 

UPDATE performance_schema.setup_instruments SET ENABLED = ’NO’ WHERE NAME LIKE ’wait/synch/mutex/%’; UPDATE performance_schema.setup_consumers SET ENABLED = ’NO’ WHERE NAME LIKE ’%history%’; 

If you use a pattern, it should be chosen so that it matches all the items of interest and no others. For example, to select all file I/O instruments, it is better to use a pattern that includes the entire instrument name prefix: 

... WHERE NAME LIKE ’wait/io/file/%’; 

A pattern of ’%/file/%’  matches other instruments that have an element of ’/file/’  anywhere in the name. Even less suitable is the pattern ’%file%’  because it matches instruments with ’file’  anywhere in the name, such as wait/synch/mutex/innodb/file_open_mutex . 

To check which instrument or consumer names a pattern matches, perform a simple test: 

SELECT NAME FROM performance_schema.setup_instruments WHERE NAME LIKE ’ pattern ’; SELECT NAME FROM performance_schema.setup_consumers WHERE NAME LIKE ’ pattern ’; 

For information about the types of names that are supported, see Section 27.6, “Performance Schema Instrument Naming Conventions” . 

## 27.4.10 Determining What Is Instrumented 

It is always possible to determine what instruments the Performance Schema includes by checking the setup_instruments  table. For example, to see what file-related events are instrumented for the InnoDB storage engine, use this query: 

mysql> SELECT NAME, ENABLED, TIMED FROM performance_schema.setup_instruments WHERE NAME LIKE ’wait/io/file/innodb/%’; +-------------------------------------------------+---------+-------+ | NAME | ENABLED | TIMED | +-------------------------------------------------+---------+-------+ | wait/io/file/innodb/innodb_tablespace_open_file | YES | YES | | wait/io/file/innodb/innodb_data_file | YES | YES | | wait/io/file/innodb/innodb_log_file | YES | YES | | wait/io/file/innodb/innodb_temp_file | YES | YES | 

