Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Moving From Rule-Based to Cost-Based

Re: Moving From Rule-Based to Cost-Based

From: Mohammed Shakir <mshakir08816_at_yahoo.com>
Date: Fri, 05 Apr 2002 18:53:18 -0800
Message-ID: <F001.0043DBB6.20020405185318@fatcity.com>


It is hard to say what will happen to the execution plans if your SQL written for rule based are run with cost based optimizer. I would collect all my queries in one file, analyze all my tables, set for cost based optimization, run the queries and check my execution plans and compare.

Some of the things you might notice is the table order in the execution plans might change. The driving table may change and that may make the world difference in execution speed.

I once did this test. I went from Oracle 7.2 on OS2 to 8.1.5 onNT and my application ran twice as fast without any changes. I am sure some of the gain is coming from Oracle 8i but it was a pleasant surprise.Cost based optimizer has improved drastically since version 7 and does a decent job of creating proper execution plans. However, you have to keep an eye on it. I have found it more difficult to optimize code using Cost optimizer than rule based optimizer. There are too many variables in statistics etc that we do not know everything about and some time it is hard to get the execution plan you want.

I still collect all the SQL in one file for all my applications. If I find that one of my process is taking very long time, I run this file and compare my execution plans. this provides me instant information on where I am having problems.

Oracle is doing more work on cost based optimizer to support new features like partitioning and so on. So it would be to your advantage to move forward to cost based optimizer. There are lot more parameters that you can use to customize the optimizer to your liking and get the type of execution plans. You can use the same execution plans on test and production system by using Oracle new execution plan stability features.

I would not simply give rule based SQL and let my customer run on cost based optimizer without me testing and making sure that it would not blow up my application.

Even though I worked on over 100 gig DB, I would not consider a 25 gig DB a small database.


Mohammed Shakir
CompuSoft, Inc.
11 Heather Way
East Brunswick, NJ 08816-2825
(732) 672-0464 (Cell)
(732) 257-6001 (Home)

Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mohammed Shakir
  INET: mshakir08816_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Apr 05 2002 - 20:53:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US