Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 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
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

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

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

The stats$sql_summary Table

Oracle Tips by Burleson Consulting
Don Burleson

The SQL statistics summary is one of the most important tables within the STATSPACK facility. As we know, tuning of SQL can often have a profound impact on the performance of your Oracle system, and the stats$sql_summary table provides the text of each SQL statement and a detailed description of the resources used by each and every SQL statement that meets the necessary thresholds conditions to be captured in a snapshot.

For now, all we need to know is that this table tracks the number of executions, the number of parse calls, and the number of data blocks read and written for each SQL statement. This information can be an invaluable tool when it comes time to tune the SQL within your Oracle database.

It also bears mentioning that the stats$sql_summary table is the most highly populated of all of the STATSPACK tables. If your threshold values are set very low and you have a busy database, it's not uncommon to get 300 to 500 rows added to the stats$sql_summary table each and every time STATSPACK requests a snapshot. Hence, it is very important that the DBA remove unwanted rows from the stats$sql_summary table once they are no longer used for SQL tuning.

Here is the version of stats$sql_summary for Oracle8 and Oracle8i.

SQL> desc STATS$SQL_SUMMARY;
 Name                                      Null?    Type
 ----------------------------------------- -------- -------------------
 SNAP_ID                                   NOT NULL NUMBER(6)
 DBID                                      NOT NULL NUMBER
 INSTANCE_NUMBER                           NOT NULL NUMBER
 SQL_TEXT                                           VARCHAR2(1000)
 SHARABLE_MEM                                       NUMBER
 SORTS                                              NUMBER
 MODULE                                             VARCHAR2(64)
 LOADED_VERSIONS                                    NUMBER
 EXECUTIONS                                         NUMBER
 LOADS                                              NUMBER
 INVALIDATIONS                                      NUMBER
 PARSE_CALLS                                        NUMBER
 DISK_READS                                         NUMBER
 BUFFER_GETS                                        NUMBER
 ROWS_PROCESSED                                     NUMBER
 ADDRESS                                   NOT NULL RAW(8)
 HASH_VALUE                                NOT NULL NUMBER
 VERSION_COUNT                                      NUMBER

Oracle9i has numerous additional columns for additional details about the SQL.  Here is the table description for Oracle9i.

SQL> desc STATS$SQL_SUMMARY
 Name                                      Null?    Type
 ----------------------------------------- -------- --------------
 SNAP_ID                                   NOT NULL NUMBER(6)
 DBID                                      NOT NULL NUMBER
 INSTANCE_NUMBER                           NOT NULL NUMBER
 TEXT_SUBSET                               NOT NULL VARCHAR2(31)
 SQL_TEXT                                           VARCHAR2(1000)
 SHARABLE_MEM                                       NUMBER
 SORTS                                              NUMBER
 MODULE                                             VARCHAR2(64)
 LOADED_VERSIONS                                    NUMBER
 EXECUTIONS                                         NUMBER
 LOADS                                              NUMBER
 INVALIDATIONS                                      NUMBER
 PARSE_CALLS                                        NUMBER
 DISK_READS                                         NUMBER
 BUFFER_GETS                                        NUMBER
 ROWS_PROCESSED                                     NUMBER
 COMMAND_TYPE                                       NUMBER
 ADDRESS                                            RAW(8)
 HASH_VALUE                                NOT NULL NUMBER
 VERSION_COUNT                                      NUMBER
 CPU_TIME                                           NUMBER
 ELAPSED_TIME                                       NUMBER
 OUTLINE_SID                                        NUMBER
 OUTLINE_CATEGORY                                   VARCHAR2(64)


If you are looking to enhance your Oracle tuning skills, you may enjoy Rampant TechPress – Oracle Tuning: The Definitive Reference by Donald K. Burleson , with over 900 pages of BC's favorite tuning tips & scripts. 

 You can buy it directly from the publisher and get instant access to the code depot of Oracle tuning scripts.


 

 

��  
 
 
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 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.