Forum Discussion

sureshsonti's avatar
sureshsonti
Icon for Helper II rankHelper II
8 years ago

RIGHT OUTER JOIN DIRECT QUERY

I am using the direct query by using 2 tables and I want to use RIGHT OUTER JOIN to do a merge. But it is taking a long time to merge the 2 tables and it is effecting the production environment. The LEFT OUTER JOIN takes a few seconds to merge the 2 tables. Why is that. With the RIGHT OUTER JOIN I am not able to merge the 2 tables.

 

Thanks for your help

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI sureshsonti

     

    Am not getting into the analysis of why Right outer join takes long time , but to get solution for your situation , Why dont you revrese the bale and use Left outer join which returns data in seconds?  Both appraoch are same.

     

    Ex: You want Table A right outer join Table B. But, "Table B Left Outer Join Table A" also gives the same result.

     

    Thanks

    Raj

    • sureshsonti's avatar
      sureshsonti
      Icon for Helper II rankHelper II

      I did the reverse as you said but I am missing some rows from the second table

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi

        It should not be the case. Obviously, you need only the matching row from the second table. If some rows misisng means,  how about the values of joining columns for those records ? Are they matching?

         

        Thanks
        Raj