We are on Aurora MySQL. Interestingly the performance_schema queries show high number of rows examined on this one. So the question is, is there any truncation that we need to do periodically? There is ps_truncate_all_tables but it’s only to reset the values and not really reduce rows.This shows 22.540 rows examined and 22,409 rows sent with an average latency of 58ms. This is all managed via performance_insight (system managed).
SELECT performance_schema
. events_statements_history
. SQL_TEXT
, performance_schema
. events_statements_history
. DIGEST
, performance_schema
. events_statements_history
. CURRENT_SCHEMA
FROM performance_schema
. events_statements_history
WHERE DIGEST
IS NOT NULL AND SQL_TEXT
IS NOT NULL