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

Thread: Cartesian join - Tuning

  1. #1
    Join Date
    Aug 2004
    Posts
    4

    Cartesian join - Tuning

    Hi all,
    In the following structure i have a query.

    select * from (select ...) A,(select...) B

    While executing the row sources A & B individually it takes some seconds to execute.
    Output of will be around 40 rows & output of B will be around 8000 rows. I want the cartesian of these two & i writen the above mentioned query & it takes 30 minutes to execute.

    How to reduce the timing ?

    Is there any specific SQL tuning options are available for Cartisian Product.

    Please update me.

    Thanks & Regards
    Ananth K.T

  2. #2
    Join Date
    Sep 2001
    Location
    Makati, Philippines
    Posts
    857

    Re: Cartesian join - Tuning

    can you post your SQL statement, table description, indexes of 2 tables?

  3. #3
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    can u post the execution plan ..?
    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"

  4. #4
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    HASH join on the smaller table may improve performance.
    Try this code:

    select /*+ ordered use_hash(A) */ *
    from
    ( select /*+ no_merge */ ...) B,
    ( select /*+ no_merge */ ...) A ;

    Tamil

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