MySQL 8.4 Release Notes
30.4.3.40 The statements_with_temp_tables and x$statements_with_temp_tables Views
这些视图列出了使用临时表的 normalized 语句。默认情况下,行按降序的磁盘临时表使用次数和降序的内存临时表使用次数排序。
statements_with_temp_tables
和 x$statements_with_temp_tables
视图具有以下列:
-
query
normalized 语句字符串。
-
db
语句的默认数据库,或者如果没有则为
NULL
。 -
exec_count
语句的总执行次数。
-
total_latency
语句的总等待时间。
-
memory_tmp_tables
语句的总内存临时表数量。
-
disk_tmp_tables
语句的总磁盘临时表数量。
-
avg_tmp_tables_per_query
语句的平均临时表数量。
-
tmp_tables_to_disk_pct
内存临时表转换为磁盘表的百分比。
-
first_seen
语句的首次出现时间。
-
last_seen
语句的最近一次出现时间。
-
digest
语句的摘要。