Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 30 Aug 2005 @ 08:49:20 GMT


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


Subj:   Re: Different Data Types and Performance
 
From:   Ballinger, Carrie

CHAR to VARCHAR does not require internal conversion.

INTEGER TO DECIMAL does require conversion, and will be stored differently internally (unless it is DECIMAL(n,0)).

CHAR(4) to CHAR (5) there is no internal conversion.

BYTE TO INTEGER, hash the same, no conversion required.

I believe that date(yyyy-mm-dd) to date(yy/mm/dd) is just a formatting difference, and should not hash differently or require a conversion.

There are two performance issues when a conversion is required...first the extra CPU used for the conversion, and second, extra redistributions, sorting, spooling involved with joins. For example, if your join columns are 1.) an integer and 2.) a decimal(15,2), then you will get row redistribution in order to perform the join, even if the values are the same from your perspective.

Run some explains and you will see the difference in your join plans for the cases where conversion is required.


Thanks, -Carrie



     
  <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