Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: CBO parameters
Gary et. al.,
Having tested the CBO behavior modification parameters for a while now and having implemented them at a few production sites, I will be glad to share my experiences. I have personally implemented all of these parameters with the values that are recommended and the optimizer's capability to create more meaningful and stable plans was noticeable.
Probal Shome from the System Performance Group at Oracle Corpn. and I had some in-depth discussions about these parameters at Oracle Open World 1999. Based on our discussions and some real-life production implementations, I wrote about these parameters in my paper on "Oracle Database Performance Management" at IOUG-A 2000. The following is a "cut & paste" from my paper.
Cheers,
Gaja.
These parameters are also relevant for environments that require hash joins for their "batch processing", but want to hold back the optimizer from being over-influenced by the hash join method. Most of these parameters are relevant in Oracle 7.3.5 (platform-specific) or above, but definitely are relevant in Oracle 8/8i.
OPTIMIZER_MAX_PERMUTATIONS
This parameter defaults to a value of 80000. When set to a
value below 80000, say between 79000-79999, it forces the
optimizer to try up to 4 different tables as the driving table
for queries that involve joins. This results in the optimizer
picking the least expensive of the 4 plans that it generates.
Usually, the default behavior is to build a plan with the
smallest table as the driving table. The default behavior may
not always generate the most suitable plan, especially for
packaged applications. The result of setting this parameter is
a nominal increase in "parse time", but a significant potential
in reduction of "execution time" of SQL statements.
OPTIMIZER_INDEX_COST_ADJ
This parameter defaults to a value of 100. The range of values
for this parameter is 1-10000. When this is set to a low value
(1-10), the optimizer is more encouraged to perform index scans
over full table scans.
OPTIMIZER_SEARCH_LIMIT
This parameter defaults to a value of 5. When this is set to 1,
the optimizer is totally discouraged from considering "cartesian
products". With its default value, the optimizer can and will
perform cartesian products for certain queries with 5 or less
tables in the FROM clause. This behavior of performing
cartesian products is suitable for small tables, but for obvious
reasons is a NO-NO for large tables. Depending on the nature of
the application this parameter needs to be tweaked.
OPTIMIZER_INDEX_CACHING
This parameter defaults to a value of 0. The range of values for
this parameter is 0-100. When this is set to 99, the optimizer
is encouraged the use of nested loops over other join methods.
Starting from 7.3, with 733_PLANS_ENABLED = TRUE and
HASH_JOIN_ENABLED = TRUE, the default value for this parameter
will influence the optimizer to consider "hash joins" over all
other joins. Hash joins are suitable for applications when
small table(s) are joined with very large table(s), and a
significant portion of the large table(s) is processed.
Manually configuring this parameter to a value of 99 does not
turn off hash joins, but does hold back the optimizer from going
with hash joins as the default join method.
Gaja Krishna Vaidyanatha | 3460 West Bayshore Road, Manager - Integration | Palo Alto, CA 94303 & Consulting Services | gaja_at_brio.com Global Alliances | (650)-565-4442 Brio Technology | www.brio.com
"Opinions and views expressed are my own and not of Brio Technology" Received on Thu Jun 01 2000 - 15:01:29 CDT