UPDATE performance_schema.setup_instruments SET TIMED = 'NO';
UPDATE performance_schema.setup_instruments SET ENABLED = 'NO';
UPDATE performance_schema.setup_timers
SET TIMER_NAME = 'NANOSECOND' WHERE NAME = 'Wait';
UPDATE performance_schema.setup_timers
SET TIMER_NAME = 'CYCLE' WHERE NAME = 'Wait';
UPDATE performance_schema.setup_instruments SET TIMED = 'YES';
UPDATE performance_schema.setup_instruments SET ENABLED = 'YES'
WHERE NAME IN ('wait/io/file/sql/FRM',
'thread/sql/Connection',
'wait/synch/cond/sql/COND_mdl',
'wait/synch/rwlock/sql/LOCK_sys_init_connect',
'wait/synch/mutex/sql/LOCK_mdl');
UPDATE performance_schema.setup_consumers SET ENABLED = 'NO'
WHERE NAME = 'events_waits_history';
UPDATE performance_schema.setup_consumers SET ENABLED = 'YES'
WHERE NAME = 'events_waits_history';
