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 


 

 

 


 

 

 

 
 

Enhanced SQL trace utility from Oracle

Oracle Tips by Burleson Consulting

Here is a great new script from Carlos Sierra, a brilliant developer at Oracle Corporation.  This script is an enhancement to the Center of Excellence (COE) script top produce a super-detailed trace of SQL execution.  This new script is remarkable, and I hope that you enjoy it as much as I do.  The MOSC page is reproduced here with Mr. Sierra's permission:

I have reproduced it below for your convenience (see below).  Carlos' script enhances standard execution plan analysis by providing:

  1. Enhanced Explain Plan (including execution order, indexed columns, rows count and blocks for tables);
     

  2. Schema Object Attributes for all Tables and Indexes accessed by the SQL statement being diagnosed (including: object dependencies, tables, indexes, columns, partitions, sub-partitions, synonyms, policies, triggers and constraints);
     

  3. CBO Statistics (for levels: table, index, partition, sub-partition and column);
     

  4. Histograms (includes table, partition and sub-partition levels);
     

  5. Space utilization and administration (for tables, indexes, partitions and sub-partitions);
     

  6. Objects, Segments, Extents, Tablespaces and Datafiles (including current performance of datafiles);
     

  7. RDBMS Initialization Parameters INIT.ORA (required, recommended and default for an APPS 11i database, and all other parameters SET on the INIT.ORA file);
     

  8. Source Code in which the SQL Statement and accessed Tables depend on (Triggers description and body, Views columns and text, Packages specs and bodies, Procedures and Functions).

SQLTXPLAIN.SQL - Enhanced Explain Plan and related diagnostic info for one SQL statement (8.1.5-9.2.0)

SQLTXPLAIN.SQL is one SQL*Plus script that using a small staging repository and a PL/SQL package creates a comprehensive report to gather relevant information on ONE SQL statement (sql.txt).  COE_XPLAIN.SQL performs the same functionality, with some limitations and restrictions.

SQLTXPLAIN.SQL differs from COE_XPLAIN.SQL in the following ways:

  1. SQLTXPLAIN.SQL collects more data about the objects in which the SQL Statement <sql.txt> depends on.  It uses V$OBJECT_DEPENDENCY to find these dependencies.
     

  2. SQLTXPLAIN.SQL can be used by multiple users concurrently.  It keeps all staging data organized by unique STATEMENT_ID, therefore it can handle concurrency and historical data.
     

  3. SQLTXPLAIN.SQL creates a better organized and documented report output.  Report sections that are not needed on a specific SQL Statement <sql.txt> are just skipped over in the new report without any headers or references.
     

  4. SQLTXPLAIN.SQL allows to keep multiple versions of CBO Stats into the same table SQLT$STATTAB.  Therefore, similar sets of CBO Stats can be restored into the Data Dictionary multiple times during a SQL Tuning exercise (without loosing original Stats).
     

  5. SQLTXPLAIN.SQL is subject to future improvements and additions, while COE_XPLAIN.SQL is not.
     

  6. SQLTXPLAIN.SQL performs better than COE_XPLAIN.SQL for same SQL Statement <sql.txt>.
     

  7. SQLTXPLAIN.SQL reports sup-partitions details.
     

  8. SQLTXPLAIN.SQL reports actual LOW and HIGH 'boiled' values of all columns on tables being accessed.  It also reports Histograms in a more comprehensive format.
     

  9. SQLTXPLAIN.SQL does not report some data shown on COE_XPLAIN.SQL that was actually not used during SQL Tuning exercises, making the new report easier to understand.
     

  10. COE_XPLAIN.SQL evolved during 2 years, while SQLTXPLAIN.SQL was designed from scratch.


 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

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