Re: Oracle 8i (8.1.7.4) Rule based v/s Cost based

Hi,
I would like to know the advantages/disadvantages of using RULE based optimizer v/s COST based optimizer in Oracle 8i. We have a production RULE based database and are experiencing performance issues on some queries sporadically.
TKPROF revealed:
call       count       cpu    elapsed             disk                  query                current              rows
Parse        0      0.00       0.00                0                      0                      0                      0
Execute      3     94.67    2699.16            1020421            5692711            51404               0
Fetch       13    140.93    4204.41             688482             4073366            0                      26896
total       16       235.60    6903.57           1708903            9766077            51404               26896
Please post your expert suggestions as soon as possible.
Thanks and Regards,
A

I think the answer you are looking for is that Rule Based optimizer is predictive, but Cost Based optimizer results may vary depending on statistics of rows, indexes, etc. But at the same time, you can typically get better speed for OLTP relational databases with CBO, assuming you have correct statistics, and correct optimizer settings set.

Similar Messages

  • Partitioning on Oracle 8i (Rule Based vs. Cost Based)

    At my current engagement, we are using Oracle Financials 11.0.3 on Oracle 8.0.6. The application uses rule-based optimizer. The client wants to implement Oracle partitioning. With this in mind, we are concerned about possible performance issues that the implementation of partitioning may cause since RBO does not recognize it.
    We agree that the RBO will see a non-partitioned table the same as a partitioned. In this scenario where you gain the most is with backup/recoverability and general maintenance of the partitioned table.
    Nevertheless, we have a few questions:
    When implementing partitions, will the optimizer choose to go with Cost base vs. Rule base for these partitioned tables?
    Is it possible that the optimizer might get confused with this?
    Could it degrade performance at the SQL level?
    If this change from RBO to CBO does occur, the application could potential perform poorly because of the way it has been written.
    Please provide any feedback.
    Thanks in advance.

    If the CBO is invoked when accessing these tables, you may run into problems.
    - You'll have to analyze your tables & ensure that the statistics are kept up to date.
    - It's possible that any SQL statements which invoke the CBO rather than the RBO will have different performance characteristics. The SYSTEM data dictionary tables, for example, must use the RBO or their performance suffers dramatically. Most of the time, the CBO beats the RBO, but applications which have been heavily tuned with the RBO may have problems with the CBO.
    - Check your init.ora to see what optimizer mode you're in. If you're set to CHOOSE, the CBO will be invoked whenever statistics are available on the table(s) involved. If you choose RULE, you'll only invoke the CBO when the RBO encounters situations it doesn't have rules for.
    Justin

  • Rule based optimizer vs Cost based optimizer - 9i

    Is Rule based optimizer not used any more or can be used depending on the application etc.
    I think Rule based optimizer still has some advantages. Please give your input if you think otherwise.
    Thx

    I think Rule based optimizer still has some
    advantages. Please give your input if you think
    otherwise.You are absolutely correct. There are a few advantages to RBO.
    RBO is better for any application that meets the following criteria:
    - designed for Oracle version 7;
    - has not been updated since Oracle 7;
    - was hand tuned in Oracle 7;
    - will not be upgraded to Oracle Database 10g (where RBO is obsolete);
    - will not use Bitmap Indexes, Materialized Views, Query Rewrite, or vitrtually anything that was introduced in Oracle8 and beyond.
    CBO, while not perfect, will allow new features to be used. And it is improving with every release.

  • How can I know the database is using Cost Based or Rule Based?

    Hi all expertise,
    How can I know the database is using Cost Based or Rule Based?
    If cost based it is using, what methods are need to use to minimize the cost when database is running? And which tables I can see the performance of the database?
    Thanks
    Amy

    how to see database setting ?
    use this
    SQL> sho parameter optimizer
    NAME TYPE VALUE
    optimizer_dynamic_sampling integer 1
    optimizer_features_enable string 9.2.0
    optimizer_index_caching integer 0
    optimizer_index_cost_adj integer 100
    optimizer_max_permutations integer 2000
    optimizer_mode string CHOOSE
    choose means if table statistics is available then it will use cost
    else
    use rule based optimizer
    for seeing performnace of table use
    set autotrace on
    and run your query
    if it doen't show cost.it means it use rule based
    for using cost based
    u will calculate table statistics
    9i
    dbms_stats.gather_table_stats('owner','table');
    8i
    analyze table <table_name> compute statistics;
    hope it will help you
    kuljeet pal singh

  • SQL 문장이 RULE 에서 COST-BASED로 전환되는 경우

    제품 : ORACLE SERVER
    작성날짜 : 2004-05-28
    SQL 문장이 RULE에서 COST-BASED로 전환되는 경우
    ==============================================
    PURPOSE
    SQL statement 문장이 자동으로 cost-based mode로 전환되는 경우에 대해
    알아보자.
    Explanation
    Rule-based mode에서 sql statement를 실행하더라도 Optimizer에 의해
    cost-based mode로 전환되는 경우가 있다.
    이런 경우는 해당 SQL이 아래와 같은 경우로 사용되는 경우 가능하다.
    - Partitioned tables
    - Index-organized tables
    - Reverse key indexes
    - Function-based indexes
    - SAMPLE clauses in a SELECT statement
    - Parallel execution and parallel DML
    - Star transformations
    - Star joins
    - Extensible optimizer
    - Query rewrite (materialized views)
    - Progress meter
    - Hash joins
    - Bitmap indexes
    - Partition views (release 7.3)
    - Hint (RULE 또는 DRIVING_SITE제외한 Hint가 왔을경우)
    - FIRST_ROWS,ALL_ROWS Optimizer의 경우는 통계정보가 없어도 CBO로 동작
    - TABLE 또는 INDEX에 Parallel degree가 설정되어 있거나,
    INSTANCE가 설정되어 있는 경우(DEFAULT도 해당)
    - Table에 domain index(Text index등) 이 생성되어 있는 경우

  • Rule based & Cost based optimizer

    Hi,
    What is the difference Rule based & Cost based optimizer ?
    Thanks

    Without an optimizer, all SQL statements would simply do block-by-block, row-by-row table scans and table updates.
    The optimizer attempts to find a faster way of accessing rows by looking at alternatives, such as indexes.
    Joins add a level of complexity - the simplest join is "take an appropriate row in the first table, scan the second table for a match". However, deciding which is the first (or driving) table is also an optimization decision.
    As technology improves a lot of different techiques for accessing the rows or joining that tables have been devised, each with it's own optimium data-size:performance:cost curve.
    Rule-Based Optimizer:
    The optimization process follows specific defined rules, and will always follow those rules. The rules are easily documented and cover things like 'when are indexes used', 'which table is the first to be used in a join' and so on. A number of the rules are based on the form of the SQL statement, such as order of table names in the FROM clause.
    In the hands of an expert Oracle SQL tuner, the RBO is a wonderful tool - except that it does not support such advanced as query rewrite and bitmap indexes. In the hands of the typical developer, the RBO is a surefire recipie for slow SQL.
    Cost-Based Optimizer:
    The optimization process internally sets up multiple execution proposals and extrapolates the cost of each proposal using statistics and knowledge of the disk, CPU and memory usage of each of the propsals. It is not unusual for the optimizer to analyze hundred, or even thousands, of proposals - remember, something as simple as a different order of table names is a proposal. The proposal with the least cost is generally selected to be executed.
    The CBO requires accurate statistics to make reasonable decisions.
    Even with good statistics, the complexity of the SQL statement may cause the CBO to make a wrong decision, or ignore a specific proposal. To compensate for this, the developer may provide 'hints' or recommendations to the optimizer. (See the 10g SQL Reference manual for a list of hints.)
    The CBO has been constantly improving with every release since it's inception in Oracle 7.0.12, but early missteps have given it a bad reputation. Even in Oracle8i and 9i Release 1, there were countless 'opportunities for improvement' <tm> As of Oracle 10g, the CBO is quite decent - sufficiently so that the RBO has been officially deprecated.

  • Profit centre derivation rule to derive profit centre based in Business plc

    Hi,
    We required "profit centre derivation rule to derive profit centre based in Business place + 9000 in such case were vendor & customers are involved and current profit center derivation logic doesnu2019t work."
    For this we have mapped a substitution pertaining to all co. codes based on all the relevant posting keys for Vendor and Customer where in system will replace the profit center based on business place given in line item as Business Place + 9000. For happening this we have written a User Exit and attached the same with this substitution through t.code OBBH. Entire hting we mapped in our testing client.
    But now the problem is whatever posting keys we have defined in our substitution are being used in normal payment and clearing also.
    Eg : In payment document vendor is debited vide posting key No 25. where the profit centre is derived based on the invoice that gets selected.
    In Normal Payment and clearing transactions, the profit centre is derived based on the profit center in offsetting line items (as per New GL Logic) currently.
    Now our business requires that where ever the system is unable to derive a profit centre for vendor and customer (And giving the error " Balancing field profit center in line item 001 not filled") transactions, then at that time profit center for that line item should replace with logic Business Place + 9000 (here business place is the business place contained by that line item in which error is coming for profit center.).
    How to map the same in the system through substitution / exit or any other method? Awaiting for your inputs pls. Thanks in advance.
    Tapan

    Still not answered.
    Requesting to give some clue for the same.
    Thanks & Regards,
    Tapan

  • Oracle Enterprise Edition Release 11.2.0.1.0 - 64bit Windows based patches

    Hi,
    We have Oracle Enterprise Edition Release 11.2.0.1.0 - 64bit Windows based server. I want to download latest patches for this version. From where can I get this? Please help me.
    Thanks,
    Mangesh

    Hi;
    1. Patch can be download only from metalink
    2. All related patch number can be found:
    NOTE:430449.1 - How to find DB Patches for the Microsoft Windows platforms My Oracle Support
    11.2.0.x Oracle Database and Networking Patches for Microsoft Platforms [ID 1114533.1]
    PS:Please dont forget to change thread status to answered if it possible when u belive your thread has been answered, it pretend to lose time of other forums user while they are searching open question which is not answered,thanks for understanding
    Regard
    Helios

  • Cost Based Oracle – Volume 1: Fundamentals - The most awaited topic book

    List,
    I was very happy to know the news from AskTom site that Mr. Jonathan Lewis has written a book on most awaited topic, i.e. Cost Based Oracle - Volumne 1. I used the terms most awaited, because, I haven't found any book on this topic, may be few technical papers, but, a complete book dedicating to this topic is new, at least in my view. What you more expect when an Oracle Expert write this books, who provides with in-detailed information and not to forget with proven tests.
    The book might be available in the book stall from November month onwards. Following is the linke and book index, if someone interested, please read it.
    http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html

    A couple of years back I had a developer bring me a poorly running query that came from a vendor package. I looked at it, asked a bunch of dumb questions, and then rewote it to drive differently. It ran great. Then I told the developer that since it was a canned package I didn't know what good my version was going to do him.
    A week later the developer came back and told me that the vendor had put my version of the query into their product. Considering that most of their installations are on SQL Server while we run on Oracle I found that amazing.
    Sometimes the unexpected happens and it is not a bad thing. But I do not recommend waging money on a vendor accepting a performance improvement suggestion. Most of them act like your shop is the only one having performance issues with their product.
    -- Mark D Powell --

  • Settlement Rule based on FL cost center

    Hi Guys,
    My client wants CC to be maintained in the Functional location and they don't want to maintain in the Equipment.
    Their Requirement is, when ever a person creates the Maintenance order for any equipments attached to the Functional location,Settlement rule should gets created automatically based on the CC maintained in the FL.
    But in standard it creates automatically when CC is maintained in the Equipment.
    How to handle this scenario.Is there is any Customer exit to handle this scenario?
    Pl guide me
    Regards
    ISWARI

    Dear Mr Thiyagarajan,
    I really appreciate your immediate response for any threads.
    Here they want to create order based on equipment(for analysis of cost through MO) and want settlement should be on the CC of FL.Hence they don't want to maintain CC in Equipment master and want to maintain CC in FL. 
    As you said ,If I maintain Cost center in FL and not maintain Cost Center in Equipment master,then while MO creation in location tab all data's were copied from equipment and CC field is empty.Hence while releasing the order,system asks for settlement rule.
    How to make the system to copy the FL cost center to the location tab of order.Pl suggest if there is any exit/badi
    Regards
    ISWARI

  • Oracle EPM 11.1.1: Business Rules issue

    Hi All,
    I have installed Oracle EPM 11.1.1 and I have created a planning application. However when I logon to Analytical Administration console and try to create a business rule I am facing the following issue:
    1. When I try to select Planning Application out I get the following errors:
    Error connecting to Essbase server <Server name>/<Application Name>.
    Detail:Could not log in to Planning Server
    2. As a work around I have set the Essbase outline and the rule is getting validated from AAS. This rule has been attached to a form and should be executed when I do a submit. However the rule is not running from the form. I tried running the rule from Planning web and again I am getting an error.
    I checked the access rights for the Business Rule from shared services and the admin user (which I am using) has Provision and Administrator rights. Is it a configuration issue or is there something that I am missing here.
    Thanks in advance,
    Amol

    NewUser2 wrote:
    Try to add a description to the Business Rule. There is a bug associated with it and you can find out in the Planning Readme. We had the same issue and got resolved by adding a description to the BR. Hope this will work for you.But the problem is he can't even create a business rule so how can he add a description to something he can't create?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Are backup notifications in Oracle 11g DB covered in notification rules

    I had a query whether a notification for backup job completion in Oracle 11g database is covered in the notification rules section available in enterprise manager. I could not find any other way of sending notification from EM so was wondering if the notification for backup job completion is covered in the notification rules section.
    Please revert with the reply to my query.
    Regards

    My understanding from your answer is as follows:-
    1) The email addresses have to be entered in Preferences->General. Say I enter [email protected] & [email protected]
    2) In Preferences->Notification Schedule, we can specify either of [email protected] or [email protected] and we cannot specify [email protected] as it is not included in Preferences->General?
    I have tried to put the observations as examples, request you to please check and revert with examples if my understanding is not correct.
    Regards

  • Help: Oracle data transition with enhancing business rules

    The work referred here is sql load flat file to Oracle table. However, due to the possible data errors, the flat file may not be able to load to Oracle table totally. The type of errors involve like unique constraint, invalid characters etc. Instead of sql load direct to the destination table, I am planning to load to a temporary table. The temp table has flags to each potential field which needs to enhance the business rules. The diagram looks like:
    Flat-File -> temp_table -> dest_table
    Take an example:
    temp_table with col_1, col_2, flg_1, flg_2
    dest_table with col_1, col_2
    temp_table will take all data from Flat-File with all varchar(x) fields.
    What I plan to is to write stored procedure to move the correct data from temp_table to dest_table. If there are any errors, through a trigger to update the temp_table flags. If there are no errors, the record will move to dest_table and the corresponding records will be removed from temp_table. A serve package utilizing Oracle FORMS will take care of the error data.
    I'd like to hear all suggestions before I implement this.
    Any suggestions are greatly appreciated.
    Thanks.
    Jimmy

    Hi Jimmy,
    Another approach could be to move data from temp table to dest_table using [DML Error Logging|http://www.oracle.com/technology/oramag/oracle/06-mar/o26performance.html]
    Or maybe even the [Badfile and External Tables|http://www.gennick.com/ETLandBad.html]
    Regards
    Peter

  • Ask your Oracle Policy Automation (formerly Haley Office Rules) questions!

    To all of you out there using or thinking of using the product originally known as RuleBurst, then as Haley Office Rules, and now proudly part of the Oracle product family as Oracle Policy Automation:
    Please feel free to post any questions you have on the product line here. The OPA team globally is keen to help out with answering your questions, whether it is about a particular feature, where to find more information, or even recommendations on how you might go about solving a particular rule-writing problem.
    Please, don't be shy! Answers to your OPA questions are just a few keystrokes away.
    And it would be great to see people starting to share their ideas, tips and tricks on how to best use the Oracle Policy Automation product family for your specific business needs. Stake your claim now as an OPA guru, and be the envy of all your friends. :-)
    Cheers,
    Davin Fifield
    Update: I have now locked this thread. Please start a new thread in this forum with any questions you have.
    Edited by: davinfifield on 14/01/2010 15:35

    Hi,
    If I change the Style for date input to Year, Month and Day edits on an Entity Instance collect screen, it will build and debug correct. The issue is that if I close the project and try to re-open it, the following error will show.
    *"Item has already been added. Key in dictionary:'_input-style' Key being added: '_input-style'"*
    After importing the files into a new project (because it didn't open anymore) I noticed that by trying to import the Interview Screens file it gives the same error. After some more research I noticed that it gave the error after changing the input Style at an Entity Instance collect screen.
    How can I still change the Style to Year, Month and Day edits (because in Dutch we normally notate dates like dd-mm-yyyy instead of yyyy-mm-dd)? Single Edit (default) is a bit unnatural, because even with all the settings being in Dutch you still need to input the date with yyyy-mm-dd.
    Thanks,
    Niels Roest

  • Settlement Rule for service order created based on sales order

    Hello,
    I am creating a sales order and entering  WBS as an cost object.
    After creation of sales order the Service order is created.
    For service order type in the settlement profile  WBS is maintained.
    But the system is not copying the WBS in Service order which is maintained in sales order.
    Can any body have an idea on this?
    Regards
    Abhijit

    Hi,
    As far as my understanding when service order is created through sales order then settlement rule is SDI and its item number
    Not what you maintained in account assignment tab of sales order
    When you settle service order then cost will settle on sales document and its item and then latter you settle sales order then settlement receiver is WBS element which you maintained in account assignment tab
    Kapil

Maybe you are looking for