Subject | Re: [firebird-support] char vs varchar |
---|---|
Author | Helen Borrie |
Post date | 2005-01-21T22:28:20Z |
At 01:38 PM 21/01/2005 +0000, you wrote:
passed with blank-padding up to the declared length.
uses an extra 2 bytes to store the length of the actual data.
strings of all sorts; use char for short, fixed length strings.
./heLen
>Just learned that varchar is a variable length string, but alwaysUmm, no...
>takes up the max length size in the database - thanks to Helen.
>Therefore my assumption of varchar being slower than char wasI told you that varchar was faster *on the wire* than char, because char is
>apparently wrong.
passed with blank-padding up to the declared length.
>Is there a data type that takes up a variable amount of space in theBoth varchar and char are compressed for storage. As I told you, varchar
>database, depending on the actual content?
uses an extra 2 bytes to store the length of the actual data.
>I sometimes have aAs I and others mentioned in the other list, use varchar for variable
>situation, where a field could take anything from 1 to 10000 chars.
>Would I need to take any precautions with respect to performance?
strings of all sorts; use char for short, fixed length strings.
./heLen