SELECT IF ( `isnull` ( `performance_schema` . `memory_summary_by_user_by_event_name` . `USER` ) , ? , `performance_schema` . `memory_summary_by_user_by_event_name` . `USER` ) AS `user` , SUM ( `performance_schema` . `memory_summary_by_user_by_event_name` . `CURRENT_COUNT_USED` ) AS `current_count_used` , `sys` . `format_bytes` ( SUM ( `performance_schema` . `memory_summary_by_user_by_event_name` . `CURRENT_NUMBER_OF_BYTES_USED` ) ) AS `current_allocated` , `sys` . `format_bytes` ( `ifnull` ( ( SUM ( `performance_schema` . `memory_summary_by_user_by_event_name` . `CURRENT_NUMBER_OF_BYTES_USED` ) / `nullif` ( SUM ( `performance_schema` . `memory_summary_by_user_by_event_name` . `CURRENT_COUNT_USED` ) , ? ) ) , ? ) ) AS `current_avg_alloc` , `sys` . `format_bytes` ( MAX ( `performance_schema` . `memory_summary_by_user_by_event_name` . `CURRENT_NUMBER_OF_BYTES_USED` ) ) AS `current_max_alloc` , `sys` . `format_bytes` ( SUM ( `performance_schema` . `memory_summary_by_user_by_event_name` . 