multi-processor optimization case study
发布时间
阅读量:
阅读量
背景:该系统的数据仓库中存在一个ETL流程耗时超过10个小时完成!通常情况下只需要1个小时即可完成。
问题定位:
查看ETL时间段内所有SQL的运行时间。
select count(1), sql_id
from dba_hist_active_sess_history
where to_char(sample_time, 'yyyy-mm-dd hh24:mi:ss') >=
'2018-08-09 19:49:59'
and to_char(sample_time, 'yyyy-mm-dd hh24:mi:ss') <=
'2018-08-10 02:13:50'
group by sql_id
order by 1 desc;
SQL_ID为gv0ahj0f3x1bv的SQL占用了4000+个快照,也就是说这个SQL持续了40000秒+
查看历史执行计划,发现是执行计划突变导致的
select distinct plan_hash_value from dba_hist_sql_plan where sql_id ='gv0ahj0f3x1bv';
2837
全部评论 (0)
还没有任何评论哟~
