Re: RULES vs. COST

From: Anton Dischner <dischner_at_med.uni-muenchen.de>
Date: Thu, 09 Feb 1995 13:48:03 +0100
Message-ID: <dischner-0902951348030001_at_gkc12a.klch.med.uni-muenchen.de>


In article <3havdo$91b_at_ams.amsinc.com>, Edward_Hillman_at_mail.amsinc.com (Ed Hillmann) wrote:

> Hi folks. I'm trying to gather opinions and guesses about Oracle7's
> optimization
> options, and what currently is the best setup.
>
> My understanding is this: Oracle has always used a RULES-based system.
> Oracle7 now has both a COST-based as well as RULES-based system.

Correct

>
> These are what I have heard...and please feel free to shoot holes in them if
> they're not right:
>
> - RULES-based optimization will not be supported by Oracle in the next few
> years.

Yes, Oracle's written statement.

> - The current COST-based system is not working 100%, ie. the optimal execution
> plan is not always chosen,

Yes, this is correct

> and there are rare instances where incorrect data
> is
> returned.
I havn't heard that, --I HOPE THIS IS NOT TRUE-- Please, if you have a demo if this bug post it!

> - When the RULES-based system is no longer supported by Oracle, they will
> have made modifications to the COST-based system, so that the parser will
> choose the correct path, no matter how the query was originally optimized.

I hope so, i don't believe it!
I think we will have to hassle around with compiler hints (doing optimization on our own :-().

>
> I was wondering if anyone had any opinions on which is currently the best
> setup (RULES vs. COST), based on any experience. I keep hearing adament
> defenses of both systems, so I figure the more the merrier. :)
>
> Thanks for any ideas, thoughts, opinions, etc,
> Ed

For me, i am doing cost-based optimization, if it's to slow i use explain plan and decide what to do: using hints, or rule based opt.

Fortunately it's easy, you only have to write: select /*+ rule */ * from tab...

Best regards,

Toni

+--------------------------------------------------------------------+
| Anton Dischner, DBA and system-programmer    Phone: +49 89 70953202|
| Institut fuer Klinische Chemie               Fax  : +49 89 70958888|
| Klinikum Grosshadern                         Home : +49 89 6254060 |
| Ludwig Maximilians Universitaet Muenchen     Handy: +49 172 8388880|
| 81366 Muenchen                                                     |
| Marchioninistr. 15                                                 |
| Germany                          Mail: dischner_at_med.uni-muenchen.de|
+--------------------------------------------------------------------+
Received on Thu Feb 09 1995 - 13:48:03 CET

Original text of this message