Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Variable length Columns vs Fixed length - response (1) by dnoeth

$
0
0

There's four bytes overhead for the first variabe column and two bytes for each additional VarChar. So VarChars are used when the average length of the string is at least two bytes less than the maximum 
Fixed length should be used for short strings up to a few chars or strings which always have a fixed length.
VarChars will only impact performance when they're sized too large (e.g. VARCHAR(255) for everything without checking the actiual data) because they will be expanded to CHARs in spool for ORDER/GROUP/PARTITION BY.
Dieter


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>