Optimizer Mode
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Optimizer Mode

  1. #1
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865

    Optimizer Mode

    when I am generating explain plan for one of my queries, I have observed the note "rule based optimizer used (consider using cbo)".

    optimizer_mode=choose

    what made Oracle to user rule based optimizer? any clue will be much appreciated.

    Database is 10.2.0.4

    If i generate the plan for same query with some hint then it is using cbo which is expected.

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Quote Originally Posted by vnktummala View Post
    when I am generating explain plan for one of my queries, I have observed the note "rule based optimizer used (consider using cbo)".

    optimizer_mode=choose

    what made Oracle to user rule based optimizer? any clue will be much appreciated.

    Database is 10.2.0.4

    If i generate the plan for same query with some hint then it is using cbo which is expected.
    Check if there are statistics on all referenced tables - Oracle will choose rule based optimizer if tables have no stats.

    The reason why is that with no statistics Oracle can't figure out the cost so it makes no sense to use CBO.
    Last edited by PAVB; 08-10-2010 at 09:32 AM. Reason: Typo
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    Thanks for the reply Paul.

    I agree with you. The tables used in the query have recent stats gathered. My concern is same query with simple parallel hint using cbo.

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  4. #4
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Can you post the 10053 trace?
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  5. #5
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    Thanks Abhaysk.

    Production system is in the process of migration so I won't get a chance to generate 10053 now. I will check the plan in UAT and it is same then i will generate 10053 and upload.

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width