How can you analyze an existing trace file to list the almost resource-intensive statements, aggregation of statistics, and to either exclude recursive call details?

How can you analyze an existing trace file to list the almost resource-intensive statements,
aggregation of statistics, and to either exclude recursive call details?

How can you analyze an existing trace file to list the almost resource-intensive statements,
aggregation of statistics, and to either exclude recursive call details?

A.
By using the DBMS_TRACE package

B.
By using the EXPLAIN PLAN command

C.
By enabling the SQL_TRACE parameter for the session

D.
By using the TKPROF utility

E.
By using the TRCSESS utility

Explanation:
D: You can run the TKPROF program to format the contents of the trace file and
place the output into a readable output file. TKPROF can also:

* Create a SQL script that stores the statistics in the database
* Determine the execution plans of SQL statements
TKPROF reports each statement executed with the resources it has consumed, the number of
times it was called, and the number of rows which it processed. This information lets you easily
locate those statements that are using the greatest resource. With experience or with baselines
available, you can assess whether the resources used are reasonable given the work done.
Incorrect:
A: DBMS_TRACE provides subprograms to start and stop PL/SQL tracing in a session. Oracle
collects the trace data as the program executes and writes it to database tables.
A typical session involves:
Starting PL/SQL tracing in session (DBMS_TRACE.SET_PLSQL_TRACE).
Running an application to be traced.
Stopping PL/SQL tracing in session (DBMS_TRACE.CLEAR_PLSQL_TRACE).
E: The trcsess utility consolidates trace output from selected trace files based on several criteria:
Session Id
Client Id
Service name
Action name
Module name
After trcsess merges the trace information into a single output file, the output file could be
processed by TKPROF
Reference: Oracle Database Performance Tuning Guide, Understanding TKPROF



Leave a Reply 1

Your email address will not be published. Required fields are marked *