Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 







Linda Webb

Got breaking Oracle news?    Burleson Consulting Oracle News

Click here for more Oracle News Headlines


Great script for viewing real-time SQL performance


See these important notes on using v$sql scripts to see real-time SQL performance.


Here is an interesting script for statistical information about the number of executions of a statements, and time in cache, to identify the profile of the statements by the applications on a database. 


ttitle "Count of executions, grouped by minutes cached." 
break on exec skip 2
       exec ,
       substr(Min_Cached,5) Min_Cached,
       ROUND(AVG(Executions),2) Avg_Exec,
       sum(executions) Executions,
       min(executions) Min_Exec,
       max(executions) Max_Exec,
       round(sum(OPTIMIZER_COST),0) Cost
 ,substr(to_char(100 * ratio_to_report(sum(OPTIMIZER_COST)) over (), '999.00'), 2) || '%'  pct_Cost
  from (
        select decode(executions,0,0,1,1,2,2) exec,
               0,' 1) 00-01min',
               1,' 2) 01-02min',
               2,' 2) 01-02min',
               DECODE(SIGN(Min_Cached-    6),-1,' 3) 03-05min',
               DECODE(SIGN(Min_Cached-   16),-1,' 4) 06-15min',
               DECODE(SIGN(Min_Cached-   31),-1,' 5) 16-30min',
               DECODE(SIGN(Min_Cached-   61),-1,' 6) 31-60min',
               DECODE(SIGN(Min_Cached-  121),-1,' 7)  1- 2hr',
               DECODE(SIGN(Min_Cached-  180),-1,' 8)   - 3hr',
               DECODE(SIGN(Min_Cached-  240),-1,' 9)   - 4hr',
               DECODE(SIGN(Min_Cached-12*60),-1,'10)   -12hr',
                    '11) 12hr+  '))))))))) Min_Cached,
          from (
               select ROUND((SysDate-
                       'yyyy-mm-dd/hh24:mi:ss'))*24*60) Min_Cached,
                 from V$SQL
                 See code download for full scripts
                where Parsing_User_ID != 0
                and executions>0
group by exec,Min_Cached;


Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational