) You can specify that EXPLAIN PLAN uses
a table other than PLAN_TABLE in the syntax of the statement. For more information
about the use of EXPLAIN PLAN, please refer to your Oracle documentation.
There are times when youwant to examine the execution plan for a single statement.
In such cases, the EXPLAIN PLAN syntax is appropriate. There are other
times when youwant to look at the plans for a group of SQL statements. For these
situations, you can set up a trace for the statements you want to examine and then
use the second utility, TKPROF, to give you the results of the trace in a more readable
format in a separate file. At other times, youmight also use Oracle??™s SQL Trace
facility to generate a file containing the SQL generated when using TKPROF in tuning
applications.
You must use the EXPLAIN keyword when you start TKPROF, as this will instruct
the utility to execute an EXPLAIN PLAN statement for each SQL statement in the
trace file. Youcan also specify how the results delivered by TKPROF are sorted. For
instance, youcan have the SQL statements sorted on the basis of the physical I/Os
they used; the elapsed time spent on parsing, executing, or fetching the rows; or the
total number of rows affected.
Pages:
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278