SELECT IF ( `isnull` ( `performance_schema` . `events_statements_summary_by_user_by_event_name` . `USER` ) , ? , `performance_schema` . `events_statements_summary_by_user_by_event_name` . `USER` ) AS `user` , `substring_index` ( `performance_schema` . `events_statements_summary_by_user_by_event_name` . `EVENT_NAME` , ? , - (?) ) AS `statement` , `performance_schema` . `events_statements_summary_by_user_by_event_name` . `COUNT_STAR` AS `total` , `sys` . `format_time` ( `performance_schema` . `events_statements_summary_by_user_by_event_name` . `SUM_TIMER_WAIT` ) AS `total_latency` , `sys` . `format_time` ( `performance_schema` . `events_statements_summary_by_user_by_event_name` . `MAX_TIMER_WAIT` ) AS `max_latency` , `sys` . `format_time` ( `performance_schema` . `events_statements_summary_by_user_by_event_name` . `SUM_LOCK_TIME` ) AS `lock_latency` , `performance_schema` . `events_statements_summary_by_user_by_event_name` . `SUM_ROWS_SENT` AS `rows_sent` , `performance_schema` . 