 |
|
Oracle Database Tips by Donald Burleson |
Requirements for OUTLINE Use
The only privilege needed to create outlines is
the CREATE ANY OUTLINE privilege. However it is also useful to be
able to select from DBA_OUTLINES
To force a session to either use or not create
out lines you would issue the command:
ALTER SESSION SET CREATE_STORED_OUTLINES
= TRUE | FALSE | <category>
This command causes Oracle to automatically
create outlines for all SQL statements issued during the session. If
set to TRUE then the category name for the outlines is set to
DEFAULT.
Note: Category should not be quoted contrary to documentation
To turn on or off the creation of stored
outlines at the system level issue the command:
ALTER SYSTEM SET CREATE_STORED_OUTLINES = TRUE
| FALSE | <category> [NOOVERRIDE]
This determines whether Oracle should
automatically create and store an outline for each query submitted
on the system. These outlines are stored in the DEFAULT category.
If a particular query already has an outline defined for it in the
DEFAULT category, that outline will remain and a new outline will
not be created.
The NOOVERRIDE option specifies that this
system setting will not override the setting for any session in
which this parameter was explicitly set.
It should be noted that outlines overide all
other optimizer settings. They are only used if a session explicitly
requests that they be used using the following command.
ALTER SESSION SET USE_STORED_OUTLINES = TRUE |
FALSE | <category>
Note: As with the previous commands, category should not be quoted
contrary to documentation
If USE_STORED_OUTLINES is set to TRUE then the
DEFAULT category is used. If set to a category then TRUE is assumed
and that category is used.
When set Oracle checks for a known stored plan
based on an address calculated from the SQL TEXT of the statement.
If a plan exists in the selected category then that plan will be
used (provided it is valid).
|