SELECT `performance_schema` . `events_statements_summary_by_digest` . `DIGEST_TEXT` AS `query` , `performance_schema` . `events_statements_summary_by_digest` . `SCHEMA_NAME` AS `db` , `performance_schema` . `events_statements_summary_by_digest` . `COUNT_STAR` AS `exec_count` , `performance_schema` . `events_statements_summary_by_digest` . `SUM_TIMER_WAIT` AS `total_latency` , `performance_schema` . `events_statements_summary_by_digest` . `SUM_NO_INDEX_USED` AS `no_index_used_count` , `performance_schema` . `events_statements_summary_by_digest` . `SUM_NO_GOOD_INDEX_USED` AS `no_good_index_used_count` , `round` ( ( `ifnull` ( ( `performance_schema` . `events_statements_summary_by_digest` . `SUM_NO_INDEX_USED` / `nullif` ( `performance_schema` . `events_statements_summary_by_digest` . `COUNT_STAR` , ? ) ) , ? ) * ? ) , ? ) AS `no_index_used_pct` , `performance_schema` . `events_statements_summary_by_digest` . `SUM_ROWS_SENT` AS `rows_sent` , `performance_schema` . 