Page 1 of 1

Table type for upto 1000 words in a comments field

Posted: Sun Sep 18, 2005 3:58 am
by facets
Hi All,

What's the best table type for a comments textarea that could be up to 1000 words?
I'm using MySQL 4.1.9.

Tia, Will

Posted: Sun Sep 18, 2005 4:14 am
by s.dot
1000 words?

Seeing as words are different lengths, that could be pretty hard to judge. :P Perhaps you mean characters? With my tables I choose type TEXT.

Posted: Sun Sep 18, 2005 4:29 am
by facets
hehe. oops.. yup 1000 characters.
TEXT it is. I've been using BLOB.

Posted: Sun Sep 18, 2005 4:39 am
by s.dot
A BLOB is a binary large object that can hold a variable amount of data. The four BLOB types, TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB, differ only in the maximum length of the values they can hold.

See Section 11.5, “Column Type Storage Requirements”.

The four TEXT types, TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT, correspond to the four BLOB types and have the same maximum lengths and storage requirements.

BLOB columns are treated as binary strings (byte strings). TEXT columns are treated as non-binary strings (character strings). BLOB columns have no character set, and sorting and comparison is based on the numeric values of the bytes in column values. TEXT columns have a character set, and values are sorted and compared based on the collation of the character set assigned to the column as of MySQL 4.1. Before 4.1, TEXT sorting and comparison are based on the collation of the server character set.
that may be useful to you :-D