开发者

Mysql Memory Storage Engine biggest text size possible

开发者 https://www.devze.com 2023-03-18 20:56 出处:网络
i have a chat system using Storage Engine [Memory] but varchar 255 is way too short, w开发者_如何学JAVAhat field type should i use? I dont plan on indexing this field.You can\'t use blob or text in a

i have a chat system using Storage Engine [Memory] but varchar 255 is way too short, w开发者_如何学JAVAhat field type should i use? I dont plan on indexing this field.


You can't use blob or text in a memory table, but you may be able to use a longer varchar depending on your version of MySQL:

Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in 5.0.3 and later versions. The effective maximum length of a VARCHAR in MySQL 5.0.3 and later is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used.

http://dev.mysql.com/doc/refman/5.0/en/char.html


The Memory engine does not support BLOB/TEXT, so char/varchar is all you've got available. Details here (search for 'blob')

0

精彩评论

暂无评论...
验证码 换一张
取 消