Archives of the TeradataForum
Message Posted: Wed, 12 Nov 2014 @ 16:22:24 GMT
<-- Anonymously Posted: Wednesday, November 12, 2014 09:32 -->
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 ) ) )
|Copyright 2016 - All Rights Reserved|
|Last Modified: 24 Jul 2020|