Subject Re: [firebird-support] CHAR and VARCHAR disk space
Author Ann W. Harrison
Michal Žeravík wrote:
> Does it mean VARCHAR are useless
> regarding to CHAR?
> Both have limit and rle compression.
> What is the difference then?

The difference between CHAR and VARCHAR is that only the value that was
stored is returned in a VARCHAR. A CHAR returns its full length,
regardless of how many characters are stored. If you concatenate two
CHAR fields, you typically end up with lots of embedded spaces
"Ann W.Harrison". The performance difference shows up in the
remote interface, where truncating trailing blanks reduces message size.


Regards,


Ann