Return-Path: <oracle-l-bounce@freelists.org>
Received: from air189.startdedicated.com (root@localhost)
 by orafaq.com (8.11.6/8.11.6) with ESMTP id i19MkZB04911
 for <oracle-l@orafaq.com>; Mon, 9 Feb 2004 16:46:35 -0600
X-ClientAddr: 206.53.239.180
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i19MkYo04906
 for <oracle-l@orafaq.com>; Mon, 9 Feb 2004 16:46:34 -0600
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP
 id A1C643949BC; Mon,  9 Feb 2004 17:49:05 -0500 (EST)
Received: with ECARTIS (v1.0.0; list oracle-l); Mon, 09 Feb 2004 17:48:02 -0500 (EST)
X-Original-To: oracle-l@freelists.org
Delivered-To: oracle-l@freelists.org
Received: from usscmail7.hds.com (usscmail7.hds.com [63.74.235.18])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 514A4394FCC
 for <oracle-l@freelists.org>; Mon,  9 Feb 2004 17:47:59 -0500 (EST)
Received: from mail.hds.com (usscmail9 [10.1.6.230])
 by usscmail7.hds.com (8.11.5-p0-rfc19719/8.11.5) with ESMTP id i19MiDR04911
 for <oracle-l@freelists.org>; Mon, 9 Feb 2004 14:44:13 -0800 (PST)
Received: from usscceb02.hds.com (usscclb02.hds.com [10.1.6.227])
 by mail.hds.com (8.11.5-p0-rfc19719/8.11.5) with ESMTP id i19Mm9c03172
 for <oracle-l@freelists.org>; Mon, 9 Feb 2004 14:48:09 -0800 (PST)
Received: by usscceb02.hds.com with Internet Mail Service (5.5.2653.19)
 id <1QHWKZW2>; Mon, 9 Feb 2004 14:48:05 -0800
Message-ID: <35CFD500D7BDCE43B9030BBA5979DC181D92BE@ussccem13.hds.com>
From: John Kanagaraj <john.kanagaraj@hds.com>
To: "'oracle-l@freelists.org'" <oracle-l@freelists.org>
Subject: RE: Max permutations
Date: Mon, 9 Feb 2004 14:49:45 -0800 
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-type: text/plain
Content-Transfer-Encoding: 8bit
X-archive-position: 153
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: john.kanagaraj@hds.com
Precedence: normal
Reply-To: oracle-l@freelists.org
X-list: oracle-l

I just checked the autographed copy of OPT 101. Paraphrasing Gaja/Kirti's
words, when this is set to a value below 80,000, the optimizer is forced to
try upto eight different tables as the driving tables for queries that
involve joins. 

OTOH, I was digging through some of my old email from another list (Oracle
Apps) where _very_ complex and large table joins are common-place, someone
reported that the time taken to execute (i.e. parse + fetch) was as below:

optimizer_max_permutations = 50             Query Time = 42  sec.
optimizer_max_permutations = 100           Query Time = 50  sec.
optimizer_max_permutations = 500           Query Time = 3    min.
optimizer_max_permutations = 1,000        Query Time = 6    min.
optimizer_max_permutations = 10,000      Query Time = 55   min.
optimizer_max_permutations = 50,000      Query Time = 117 min.
optimizer_max_permutations = 80,000      Query Time = 219 min.

Dunno why so many combinations were tested though! Nor do I have the SQL or
explain plans... :(

I do know however, that this was on 8.1.7.2 (i.e an erly version of 8.1.7)
and that Oracle recommends a setting of 2000 for OMP in Oracle Apps 11i
installs.	

John Kanagaraj
DB Soft Inc
Phone: 408-970-7002 (W)

Listen to great, commercial-free christian music 24x7x365 at
http://www.klove.com

** The opinions and facts contained in this message are entirely mine and do
not reflect those of my employer or customers **

>-----Original Message-----
>From: oracle-l-bounce@freelists.org 
>[mailto:oracle-l-bounce@freelists.org] On Behalf Of Wolfgang Breitling
>Sent: Monday, February 09, 2004 12:42 PM
>To: oracle-l@freelists.org
>Subject: Re: Max permutations
>
>
>Dave Ensor, in his presentation at UKOUG claims
>- reduce the setting (say to 40,320) and
>   - Oracle uses an enhanced strategy to decide which join 
>orders to evaluate
>   - very significantly increases the probability of picking 
>the correct 
>driving table for a join of more than 8 tables
>   - decreases parse time for joins of more than 8 tables
>
>Gaja, Kirti, et al. also claim in their book "Performance 
>Tuning 101" that 
>OMP 79,999 and 79,998 have "magic" powers. That was for Oracle 8.
>
>That last piece is from memory, so it may not be correct. The 
>book is at 
>home and I'm at a client's site.
>Kirti, care to confirm/deny/comment.
>
>At 08:51 AM 2/9/2004, you wrote:
>
>>Has anyone done any recent testing on the
>>effect of optimizer_max_permutations.
>>
>>I recall seeing a note on metalink once said
>>the CBO would change the way in which it
>>permuted join orders if the parameter was
>>set to any value other than 80,000.  I'm also
>>fairly sure that I ran up a test a few years
>>ago that demonstrated this effect.
>>
>>However, I've just run up a simple test on
>>8.1.7.4 and 9.2.0.4 where the only change
>>was the number of join orders examined
>>before the optimizer stopped (a few hundred
>>for omp = 2000, a couple of thousand for
>>omp-80000) - the permutation sequences were
>>was identical.
>
>Wolfgang Breitling
>Oracle7, 8, 8i, 9i OCP DBA
>Centrex Consulting Corporation
>http://www.centrexcc.com 
>
>
>----------------------------------------------------------------
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>----------------------------------------------------------------
>To unsubscribe send email to:  oracle-l-request@freelists.org
>put 'unsubscribe' in the subject line.
>--
>Archives are at http://www.freelists.org/archives/oracle-l/
>FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
>-----------------------------------------------------------------
>
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

