[UPHPU] varchar vs text
Wade Preston Shearer
lists at anavidesign.com
Wed Dec 15 19:00:56 MST 2004
> VARCHAR and the BLOB and TEXT types are variable-length types. For
> each, the storage requirements depend on the actual length of column
> values (represented by L in the preceding table), rather than on the
> type's maximum possible size. For example, a VARCHAR(10) column can
> hold a string with a maximum length of 10 characters. The actual
> storage required is the length of the string (L), plus 1 byte to
> record the length of the string. For the string 'abcd', L is 4 and the
> storage requirement is 5 bytes.
> So storage wise you are only out and extra byte for using a text
> column type.
Thanks, Fred. Looks like I was wrong. I thought that text was the same
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2371 bytes
Desc: not available
Url : http://uphpu.org/pipermail/uphpu/attachments/20041215/8df6d6b3/smime.bin
More information about the UPHPU