26.4.3.40 statement_with_temp_tables 和 x $ statements_with_temp_tables 视图
这些视图列出了使用临时 table 的规范化语句。默认情况下,行按使用的磁盘上临时 table 的降序排列和使用的内存中临时 table 的降序排列。
statements_with_temp_tables和x$statements_with_temp_tables视图具有以下列:
query
规范化的语句字符串。
db
语句的默认数据库;如果不存在,则为NULL
。
exec_count
语句已执行的总次数。
total_latency
定时出现的语句的总 await 时间。
memory_tmp_tables
由该语句的出现创建的内部内存临时 table 的总数。
disk_tmp_tables
由该语句的出现创建的内部磁盘临时 table 的总数。
avg_tmp_tables_per_query
每次出现该语句时创建的内部临时 table 的平均数量。
tmp_tables_to_disk_pct
内部内存临时 table 已转换为磁盘 table 的百分比。
first_seen
第一次看到该声明的时间。
last_seen
最近一次发 table 该声明的时间。
digest
语句摘要。