Wednesday, August 14, 2013

Performance - AWR Compare Periods

On a fairly standard Reporting System (11gR1) , made a small change on the application side (meant to flood the DB with requests) and needed to see the impact on the Workload in the DB.

Needed to compare AWR reports generated from 2 different periods.
  1. before the Change
  2. After the Change.
Here is what you can do:

as DBA simply run : @$ORACLE_HOME/rdbms/admin/awrddrpt.sql 
Grab output and analize.

Or 
select snap_id, end_interval_time 
from dba_hist_snapshot 
where end_interval_time > trunc(sysdate-1) 
order by snap_id; 

8945                                   28/07/2009 12:00:18.555 AM          
8946                                   28/07/2009 1:00:30.647 AM           
8947                                   28/07/2009 2:00:42.740 AM           
8948                                   28/07/2009 3:00:55.045 AM           
8949                                   28/07/2009 4:00:07.050 AM           
8950                                   28/07/2009 5:00:19.198 AM           
8951                                   28/07/2009 6:00:31.596 AM           
8952                                   28/07/2009 7:00:43.751 AM          

select * from TABLE(DBMS_WORKLOAD_REPOSITORY.awr_diff_report_html(3565443845,3,30832,30843,3565443845,3,31000,31011));