DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Query optimization

Hybrid View

  1. #1
    Join Date
    Feb 2001
    Posts
    75

    Thumbs down

    I have a query like select .... from a,b where a.col=b.col
    and a.col1=xxx. Both tables are very large.

    My problem is that oracle CBO is first doing join then applies filter. I want it to do other way round. I can do it by re-phrasing the query.

    Am I missing some settings in init.ora? Why is CBO always doing hash join on tables and then filtering. The query takes over & over and as per its estimate will take 120 hours!

    Please help.

    Kailash pareek

  2. #2
    Join Date
    Jul 2000
    Location
    Amsterdam
    Posts
    234

    Query performance

    Hi Kkpareek,

    Can you create an index on a.col1 (or is there already one there)?

    Greetings,

    Tycho

  3. #3
    Join Date
    Oct 2000
    Posts
    467

    Hi

    Hi,
    Can you try an interchange.. where a.col = and a.col = b.col

    Cheers
    Vinit

  4. #4
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    Please post the actual query and actual plan. If there is an index on a.col1, then the CBO would definitely hit that first.

    - Chris

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