SELECT `performance_schema` . `events_waits_summary_global_by_event_name` . `EVENT_NAME` AS `events` , `performance_schema` . `events_waits_summary_global_by_event_name` . `COUNT_STAR` AS `total` , `sys` . `format_time` ( `performance_schema` . `events_waits_summary_global_by_event_name` . `SUM_TIMER_WAIT` ) AS `total_latency` , `sys` . `format_time` ( `performance_schema` . `events_waits_summary_global_by_event_name` . `AVG_TIMER_WAIT` ) AS `avg_latency` , `sys` . `format_time` ( `performance_schema` . `events_waits_summary_global_by_event_name` . `MAX_TIMER_WAIT` ) AS `max_latency` FROM `performance_schema` . `events_waits_summary_global_by_event_name` WHERE ( ( `performance_schema` . `events_waits_summary_global_by_event_name` . `EVENT_NAME` != ? ) AND ( `performance_schema` . `events_waits_summary_global_by_event_name` . `SUM_TIMER_WAIT` > ? ) ) ORDER BY `performance_schema` . `events_waits_summary_global_by_event_name` . `SUM_TIMER_WAIT` DESC 