RE: awr history

  • From: "Allen, Brandon" <Brandon.Allen@xxxxxxxxxxx>
  • To: "kjped1313@xxxxxxxxx" <kjped1313@xxxxxxxxx>, "eglewis71@xxxxxxxxx" <eglewis71@xxxxxxxxx>, "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>, Karl Arao <karlarao@xxxxxxxxx>
  • Date: Thu, 13 Jan 2011 12:00:25 -0700

These are nice scripts, but just one caution on a problem I just noticed with 
them - if your snap_ids skip numbers in their sequence then the stats for those 
intervals will be omitted because the query relies on logic like this: "AND 
s1.snap_id           = s0.snap_id + 1"

Another way of doing this without the limitation above is to use the LAG 
function - here is an example:

select a.snap_id, a.snap_time, round((b.value-lag(b.value) over (order by 
a.snap_time)) / (86400*(a.snap_time-lag(a.snap_time) over (order by 
a.snap_id)))) as "Rds/sec" from stats$snapshot a, stats$sysstat b where 
a.snap_id = b.snap_id and = 'physical reads' and a.snap_time > sysdate-1 
order by 1;


From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Kellyn Pedersen

Karl must have missed this email, but I'll promote his scripts for him...   
I've had way too much fun with them not to! :)
The AWR gen script, (awr_genwl.sql) was a source of great fun, that only after 
a few, minor tweaks and a table creation, I was retaining high level AWR data 
by dbid in a repository.  How nice it was to create many pretty, colorful 
graphs for non-technical managers when they were quick to say, "It was the 
databases fault!" :D

Privileged/Confidential Information may be contained in this message or 
attachments hereto. Please advise immediately if you or your employer do not 
consent to Internet email for messages of this kind. Opinions, conclusions and 
other information in this message that do not relate to the official business 
of this company shall be understood as neither given nor endorsed by it.

Other related posts: