mysql - Confusion about varchar datatype -


my server has sql version of 5.0.91-community, have store long string of approx 500 character more or less, thought of going text data type told me slows performance, wanted know more varchar , it's limit.

i used think varchar limited 255 characters, read somewhere capable of storing more in newer version i.e >= 5.0.3 , using 5.0.91 think should use? if use varchar(1000) still valid?

thank you.

the documentation here,

  • varchar has max size of 65,535 in mysql 5.0.3 , later , before 5.0.3 limit 255

note effective size less,

the effective maximum length of varchar in mysql 5.0.3 , later subject maximum row size (65,535 bytes, shared among columns) , character set used.

you have specify max size, e.g. varchar(1000). stating varchar isn't enough.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -