Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 12 Nov 2014 @ 16:22:24 GMT


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


Subj:   Query tuning - How to handle casting in Joins
 
From:   Anomy Anom

<-- Anonymously Posted: Wednesday, November 12, 2014 09:32 -->

Hi Forum,

Need help in understand query tuning.

How to avoid casting in joins? Does the optimizer recognizes or takes the benefit of stats if there is casting on one of the columns in joins? What is the alternative or how to handle casting in joins?

Your inputs will be highly appreciated.

For example:

SELECT ... ... ... INNER JOIN ( INNER JOIN ( INNER JOIN ( ... ... ON ( ( CAST(DBW_WORK.COGNO_CNTR_CUST.CUST_ESTI_DT AS TIMESTAMP( 6 ) ) = CAST( DEV_WORK.DATE_DIM.DATE_DMD AS TIMESTAMP( 6 ) ) ) ON AND ON.. ... ... WHERE ( ( (DBW_WORK.TGT_SAP_TB. CUSTOMER = CAST( DEV_WORK.RELTN_CUST_TB.CONTRCT_CUSTOMER AS VARCHAR ( 21 ) ) )

Thanks,

Anomy.



     
  <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: 15 Jun 2023