Sunday, August 15, 2021

TKPROF Overview

 

TKPROF Overview.

 

TKPROF is used for diagnosing performance issues.  It formats a trace file into readable format for performance analysis.

Syntax

tkprof    tracefile_name.trc  tracefileoutput.txt sys=no  sort='(prsela,exeela,fchela)'  explain=apps/apps passwd.

 

 

sys – Enables or disables the inclusion of SQL statements executed by the SYS user, including recursive SQL statements.  Default=enable. 

explain – Executes an Explain Plan for each statement in the trace file and displays the output. Explain Plan provides the predicted optimizer execution path without actually executing the statement.  tkprof shows you the actual execution path and statistics after the statement is executed.

 

sort – Sorts the SQL statements in the trace file by the criteria required.It provides SQL statements that consume the most resources at the top of the file, rather than searching the entire file contents for the poor performers.

prsela – The elapsed time spent parsing the SQL.

exeela – The elapsed time spent executing the SQL.

fchela – The elapsed time spent fetching rows.

No comments:

Table import and export.

Create Data Pump Directory. The first step in Oracle Data Pump is to create an OS level directory which will be used by Oracle for perform...