SELECT IF ( `isnull` ( `performance_schema` . `events_waits_summary_by_user_by_event_name` . `USER` ) , ? , `performance_schema` . `events_waits_summary_by_user_by_event_name` . `USER` ) AS `user` , SUM ( `performance_schema` . `events_waits_summary_by_user_by_event_name` . `COUNT_STAR` ) AS `ios` , SUM ( `performance_schema` . `events_waits_summary_by_user_by_event_name` . `SUM_TIMER_WAIT` ) AS `io_latency` FROM `performance_schema` . `events_waits_summary_by_user_by_event_name` WHERE ( `performance_schema` . `events_waits_summary_by_user_by_event_name` . `EVENT_NAME` LIKE ? ) GROUP BY IF ( `isnull` ( `performance_schema` . `events_waits_summary_by_user_by_event_name` . `USER` ) , ? , `performance_schema` . `events_waits_summary_by_user_by_event_name` . `USER` ) ORDER BY SUM ( `performance_schema` . `events_waits_summary_by_user_by_event_name` . `SUM_TIMER_WAIT` ) DESC 