Using DBMS_AUTO_REPORT to retroactively identify performance problems

Find the problematic SQL ID to investigate, then execute:

col report_id new_v report_id
select * from 
 (
 select * from DBA_HIST_REPORTS
 where key1 = '&&sql_id'
 and COMPONENT_NAME = 'sqlmonitor'
 order by generation_time desc
)
where rownum = 1;

This will give you the most recent execution, but you may want to use different criteria. Next, generate a plan statistics report in text format:

SELECT DBMS_AUTO_REPORT.REPORT_REPOSITORY_DETAIL(
RID => &&report_id
, TYPE => 'text')
FROM dual;

This report contains all sorts of useful information to help pin down the performance bottleneck.

 

Kommentar verfassen

Bitte logge dich mit einer dieser Methoden ein, um deinen Kommentar zu veröffentlichen:

WordPress.com-Logo

Du kommentierst mit deinem WordPress.com-Konto. Abmelden /  Ändern )

Facebook-Foto

Du kommentierst mit deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s