TOP10 SQL語句

top 10
select schema_name,digest_text,count_star,sys.format_time(sum_timer_wait) as sum_time,
sys.format_time(min_timer_wait) as min_time,sys.foRmat_time(avg_timer_wait) as avg_time,
sys.format_time(max_timer_wait) as max_time,sys.format_time(sum_lock_time) as sum_lock_time,
sum_rows_affected,sum_rows_sent,sum_rows_examined from performance_schema.events_statements_summary_by_digest
where schema_name is not null order by count_star desc limit 10ide

在events_statements_summary_by_digest表中不記錄具體的 錯誤信息,只作錯誤語句統計。因此,若是須要查詢具體的錯誤信息(例 如:具體的錯誤代碼、具體的錯誤提示信息以及具體的錯誤SQL語句文本 等),還須要查詢events_statements_history表或者events_statements_history_long 表。orm

相關文章
相關標籤/搜索