Re: DBA_HIST_SQLSTAT/SQLTEXT View and Function I created

  • From: Chris Taylor <christopherdtaylor1994@xxxxxxxxx>
  • To: "Christopher.Taylor2@xxxxxxxxxxxx" <Christopher.Taylor2@xxxxxxxxxxxx>
  • Date: Fri, 30 Nov 2012 20:34:49 -0600

Also should point out that the scripts roll up SQL statements based on 
force_matching_signature - it taxes the max(sql_id) instead of all SQL ids and 
displays that sql text as a representative sample (in the case of changing 
literals).

Sent from my mobile device.  Please ignore any typos or misspellings.

On Nov 30, 2012, at 7:08 PM, <Christopher.Taylor2@xxxxxxxxxxxx> wrote:

> Guys/Gals,
> Here are a couple of scripts (very rough probably - but hey, I'm proud of 
> them).
> 
> The first is a pretty standard view - it limits the query time range to a 
> specific window of 12am to 5am (because that is the period I most interested 
> in usually)
> 1.      http://codepaste.net/2a9o83
> 
> The second script is a Pipelined function I wrote to use the above view but 
> enabled to pass in a specific start time and end time interval.  This 
> interval needs to encompass your AWR snapshot intervals.  So if your snapshot 
> interval is one hour, then the start datetime/end datetime will need to be at 
> least an hour apart.
> 2.      http://codepaste.net/pdcfo5
> 
> I thought these might be useful to someone besides me.  (Caveat:  The hints I 
> used in the SQL may or may not be useful but seemed to give a bit of better 
> performance overall though I didn't actually test whether that was true).
> 
> 
> 
> Chris Taylor
> Oracle DBA
> Parallon IT&S
> christopher.taylor2@xxxxxxxxxxxx<mailto:christopher.taylor2@xxxxxxxxxxxx>
> www.parallon.net
> 
> 
> 
> --
> //www.freelists.org/webpage/oracle-l
> 
> 
--
//www.freelists.org/webpage/oracle-l


Other related posts: