Ask the Expert

Interpreting TKPROF results

How do I interpret the TKPROF result? Give me the basic idea behind it.

    Requires Free Membership to View

TKPROF shows, for each SQL statement in the trace file, the total number of parse, execute, and fetch calls, and the following statistics for each: CPU time, elapsed time, disk reads, consistent gets, current-mode gets, and number of rows affected. The meaning of each should be obvious, with the possible exception of the two types of gets. "Consistent gets" are block gets to satisfy a query. "Consistent" refers to the fact that the block may be reconstructed to reflect the state of the block as of the instant that the query was executed (determined by the system change number, or SCN, that was in effect at that time). "Current-mode gets" are gets of a database block as it exists at the time of the operation, usually for DML (insert, update, delete). In Oracle9i TKPROF, you can also get information on wait events if the trace file contains them.

Interpretation of the results generally consists of looking for the highest time and resource consumption, and then determining if they can be reduced; for example, a query that does many disk I/Os as a result of a full-table scan will probably run faster after creation of an appropriate index on the table being scanned.


This was first published in September 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: