Call now: 252-767-6166  
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 








  Oracle Database Tips by Donald Burleson


TKPROF is a utility that Oracle provides to help make sense of raw trace files.  It has been available for quite some time, at least back to version 7.  It offers some benefits over manual analysis of trace files; most importantly, it is much easier to run TKPROF than to spend hours digging through a trace file.  Another benefit is that it is included with Oracle database software and installed with the database so there is no additional cost to use it. 

TKPROF is run like any other program with a couple parameters passed to tell it how to process the trace file.  A brief example will be presented here.  For further research into this utility, read the Oracle documentation, pick up one of many other books like Dave Moore's "Oracle Utilities", or read any of several articles like "Doc ID: 142898.1" from MOSC or other web sites to get a deeper understanding of the power of this tool. 

A sample run of this tool using the trace file that was explained in the previous section looks like this: 

$ tkprof toy_ora_32622_find_me.trc tkprof_32622.trc explain=system/manager waits=y sort=PRSCNT 

Executing the above command produces a file named tkprof_32622.trc. It includes an explain plan based on the user SYSTEM that will include a summary of the wait events found in the trace file. The SQL statements will be sorted based on the count of parses.  The output file will look like Figure 3.4.

Figure 3.4 - Sample TKPROF output

The following is a line-by-line description of the output.

Lines 1-4: Version and execution date and time information.

Line 5:  Trace file name.

Line 6:  Sorts that were used to produce this output report.  The count of parse calls in this example.

Lines 7-15: Additional information about the columns that are listed in the measurements section of the report.

Lines 17-20: Top SQL statement according to the sort specified when running TKPROF and reported on line 6.

Lines 23-29: Measurements section.  Compare the number of parses and executes, one parse to many executes is good.  All the information in this section is helpful to understand the work this SQL statement needs to do.

Lines 35-38: The explain plan used to execute this SQL statement.  Notice that there is a field called time.  This field reports the time taken for each step and its children steps.  In this example, the time taken as shown on line 37 is about 200 microseconds.

There are many sort options that are available, especially with Oracle 9.2.x. Additional reading to learn more about this tool is recommended.

The above book excerpt is from:

Oracle Wait Event Tuning

High Performance with Wait Event Iinterface Analysis 

ISBN 0-9745993-7-9  

Stephen Andert

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.