Re: awr history

  • From: Kellyn Pedersen <kjped1313@xxxxxxxxx>
  • To: daniel.fink@xxxxxxxxxxxxxx, Brandon.Allen@xxxxxxxxxxx
  • Date: Thu, 13 Jan 2011 14:41:24 -0800 (PST)

Now aren't you guys smart! :P
I did actually keep track of instance restarts and had a flag in the repository 
table, but it was a quick way to fix that problem and wasn't really the best 
way.

Skipping numbers in the snap_id's?  I'm trying to remember if I've actually 
seen 
that, (and I may have and just was oblivious to it!)  Something to look into...
Thank you gentlemen, I do not plan on giving up the scripts and code I wrote to 
wrap around Karl's scripts-  I'm kind of partial to it... :)

 
Kellyn Pedersen
Mulit-Platform Database Administrator
http://www.linkedin.com/in/kellynpedersen
www.dbakevlar.com
 




________________________________
From: Daniel W. Fink <daniel.fink@xxxxxxxxxxxxxx>
To: Brandon.Allen@xxxxxxxxxxx
Cc: "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
Sent: Thu, January 13, 2011 12:09:05 PM
Subject: Re: awr history

I will add one more caveat - remember that values reset after     instance 
restarts. So if you are depending on calculating the deltas     (the only 
option 
available in statspack), you need to test for an     instance restart and 
adjust 
your logic appropriately. I have a     script     
(http://www.optimaldba.com/scripts/CustomStatspack/optstat_statistic_matrix_weekly.sql)
     that has that logic in the factored subqueries at the beginning. 


On 1/13/2011 12:00 PM, Allen, Brandon wrote: 
 
>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 b.name =             'physical 
>reads' and a.snap_time > sysdate-1 order by 1;
> 
>Regards,
>Brandon
> 
>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
>http://karlarao.wordpress.com/scripts-resources/
> 
>
> 
> 
>________________________________
 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.
> 
>  No virus found in this incoming message. Checked by AVG - www.avg.com 
>Version: 9.0.872 / Virus Database: 271.1.1/3376 - Release Date: 01/12/11 
>12:34:00
>
>


      

Other related posts: