Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 07 Jan 2004 @ 07:49:56 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: View Performance
 
From:   Narayan Murthy

Try reordering the join, taking advantage of how merge join works and considering the number of rows in your tables.

Original Query :

       FROM OBC_MASTER.LU_OBC_RCONTACT_JOB_ADDNL_INFO REC
            INNER JOIN OBC_MASTER.LU_OBC_JOB_INFO RECJOB
         ON RECJOB.JOB_ID         = REC.JOB_ID
            INNER JOIN OBC_MASTER.FA_OBC_MDN_MTD RECMTD
         ON RECMTD.JOB_ID         = REC.JOB_ID
            INNER JOIN OBC_LOAD.NPA_NXX_OUTBOUND L
         ON L.NPANXXX             = RECMTD.NPANXXX

Modified Query:

       FROM ( OBC_MASTER.LU_OBC_RCONTACT_JOB_ADDNL_INFO REC
            INNER JOIN OBC_MASTER.LU_OBC_JOB_INFO RECJOB
         ON RECJOB.JOB_ID         = REC.JOB_ID)
           INNER JOIN (         OBC_MASTER.FA_OBC_MDN_MTD RECMTD
                                INNER JOIN OBC_LOAD.NPA_NXX_OUTBOUND L
                              ON L.NPANXXX             = RECMTD.NPANXXX
          ) ON RECJOB.JOB_ID = RECMTD.JOB_ID

Narayan



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016