Subject Re: [IBO] elementary question, blob versus varchar in ib
Author Daniel Rail
At 15/03/2002 05:38 PM, you wrote:
>Thanks for your help. Have I been worrying my poor old head about
>wasting space for all this time? Why not have a varchar(255) if it
>really takes no space in the database when null?
>Yes I expect to use memo components to put such comments in.
>I suppose I could do some experiment to test the fact that null
>columns occupy no space but I have not seen that in the Interbase
>manuals anywhere...perhaps I should know it anyway. I have always
>been confused about varchar(20) versus char(20).
>Any confirmation would be welcome.

Varchar is a variable length character field, in other words the space it
occupies depends on the number of characters in the field.

Char is a fixed length character field, in other words the space will
always be the same record after record.

The space that both of these types of fields occupies depends on the
character set specified(i.e. ASCII is 1 byte per character, while
UNICODE_FSS is 3 bytes per character).

But, also when Varchar contains characters it uses 2 additional bytes for
the field, this is the character count for the field. Also, considering
your situation that approx. 1 in 20 records will have information in this
field, I would personally go for varchar.

Daniel Rail
Senior System Engineer
ACCRA Group Inc. (
ACCRA Med Software Inc. (