WSR报告解读
report summary
average load, 平均负载 high
Database Load
temp allocates 临时表空间申请次数
Tpp 30 events by total wait time
TOP等待时间的事件,如果出现了direct path write temp(临时表空间写)说明使用到了临时表空间,一般是内存temp buff 不够引起的
Data Buffer & Temp Buffer
TempFree 为0,表示temp buff用尽了
SQL Statistics
SQL order by Elapsed Time
Long SQL ordered by Elapsed Time
Session Statistics
Session ordered by Long SQL
Event 指等待的事件
问题现象,
TEMP表空间不足
code=10002,dbErrCode=786,excueSql failed,could not find datafile to extend extent in tablespaces TEMP,
问题分析
为了提高查询效率,当查询需要对数据进行排序,分组,聚合等操作时,可能会产生大量的临时数据,这些数据就会存储在内存的temp buffer 空间中。当temp buffer不够时,就会就会将查询中产生的临时数据保存到临时表空间,临时表空间是直接操作磁盘,查询性能会大大下降。
Tpp 30 events by total wait time
Data Buffer & Temp Buffer
进一步查看什么查询导致temp buffer用尽了
Session ordered by Long SQL