
46
|
Toad Pocket Reference for Oracle
statement, you must do so in the SQL Editor. Once you have
made these changes, you can generate a new Explain Plan
while in the SQL Editor and then return to the Explain Plan
window and click the Refresh button to update the display.
You may occasionally need to perform some maintenance to
clear Explain Plan results that are no longer needed. Select
the obsolete Explain Plan results and click Clear.
Before you can use the Previous Explain Plan Results fea-
ture, you must go to View
➝ Options ➝ Oracle ➝ General
and turn on the Save previous Explain Plan results (requires
Toad tables) option.
SQL Optimization Facilities
The following sections describe a variety of Toad facilities
used to review statistics and tune SQL statement execution.
AutoTrace
Toad’s AutoTrace feature lets you review resource usage for
a particular query in the SQL Editor. AutoTrace is a mini-
version of Oracle’s SQL Trace (described in the next sec-
tion). AutoTrace requires that the query be generated in
order to capture execution statistics.
AutoTrace displays information such as Recursive Calls,
Physical Reads, Consistent Gets, Index Scans, etc. The
results are displayed in the AutoTrace tab of the Results
panel.
If AutoTrace is not enabled when you click the AutoTrace
button in the Results panel, Toad prompts you to enable it.
You can enable or disable AutoTrace from SQL Editor
➝
Right Mouse
➝
AutoTrace ...