Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 02 Sep 2003 @ 19:34:18 GMT


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


Subj:   Re: VARCHAR vs. CHAR
 
From:   Morris, Mark

There is no general rule on VARCHAR vs. compressed CHAR. The demographics must be considered.

If the field width has a high variance and compressibility is low then VARCHAR wins.

If the field width has a low variance and compressibility is high then compression wins.

VARCHAR adds a 2 byte count per row, while compression adds any unused bytes in the non-compressed rows, plus the precence bits. Compression CPU use is in general more than compensated for by the CPU savings from doing less IO.

If the total space consumption works out to be within about 5% then I recommend VARCHAR because it will use less CPU in this case.

Mark Morris
Teradata Architecture



     
  <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