SQL Execution Plan

Getting an Execution Plan report

 

SET AUTOTRACE ON ; Reporting only on the optimizer execution plan and SQL statement execution stats.

SET AUTOTRACE ON EXP ; Only active on execution plans and not on query results.

SET AUTOTRACE ON STAT ; Report on statistical information.

SET AUTOTRACE ON TRACEONLY ; Execution plan and statistics.

SET AUTOTRACE ON EXPLAIN ; Reporting only on the optimizer execution plan.

To use "SET AUTOTRACE ON" it may be necessary to run the following script (as a sys user)

as username omar

The following error output could be due to user privileges. As a solution, temporarily grant privileges and later revoke them.

Example

Changes made using queries or changes made in the indexes take effect after clearing the shared pool and the buffer cache.

(A feature that was introduced with release 10G, empties the buffer cache within the SGA)

It’s necessary use the bind variable to make effective use of the Library Cache.
The following query doesn’t use a bind variable.

A query that does use a bind variable.

THe following syntax shows how to use a bind variable with SQL*Plus.

Kategori seçin...