Name
SET AUTOTRACE
Synopsis
The AUTOTRACE setting controls whether SQL*Plus displays the execution plan and statistics for each SQL statement as it is executed.
Syntax
SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]
Parameters
- SET AUTOT[RACE]
Is the command, which may be abbreviated SET AUTOT.
- OFF
Disables the autotrace feature. SQL*Plus won't display the execution plan or the statistics for each SQL statement.
- ON
Turns the autotrace feature on. If no other parameters are supplied, SQL*Plus will default to displaying the statistics. SET AUTOTRACE ON is equivalent to SET AUTOTRACE ON STATISTICS.
- TRACE[ONLY]
Inhibits the display of all data returned when the SQL statement in question is a SELECT statement.
- EXP[LAIN]
Causes SQL*Plus to display the execution plan for each SQL statement you execute.
- STAT[ISTICS]
Causes SQL*Plus to display execution statistics for each SQL statement you execute.
See Chapter 12 for comprehensive examples showing how to use the autotrace feature of SQL*Plus. Chapter 12 shows how to interpret the execution plan output and describes the operations that may be used in that plan.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access