Subject | Re: [firebird-support] CHAR and VARCHAR disk space |
---|---|
Author | Ann W. Harrison |
Post date | 2005-01-16T17:25:40Z |
Michal Žeravík wrote:
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
> Does it mean VARCHAR are uselessThe difference between CHAR and VARCHAR is that only the value that was
> regarding to CHAR?
> Both have limit and rle compression.
> What is the difference then?
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