Should the length of varchar type in MySQL be a multiple of the field's encoding?
習慣沉默
習慣沉默 2017-05-18 10:49:34
0
3
590

I once saw someone on stackoverflow saying that it is recommended that when the length of the varchar field cannot be estimated, it is best to set it to an integer multiple of the encoding. For example, if the utf8 encoding is three bytes, then setting it to 255 is more appropriate. Is there any scientific basis for this?

習慣沉默
習慣沉默

reply all(3)
滿天的星座

I only know that the maximum length of varchar is 255

曾经蜡笔没有小新

Prevent space waste and fragmentation

某草草

I think this is more appropriate.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!