What’s the difference between VARCHAR(255) and TINYTEXT string types in MySQL?
Each of them allows to store strings with a maximum length of 255 characters. Storage requirements are also the same. When should I prefer one over another?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot assign a
DEFAULTvalue to aTINYTEXTand you cannot create an unprefixed index on the latter.Internally, additional objects are allocated in memory to handle
TEXT(incl.TINYTEXT) columns which can cause memory fragmentation on the large recordsets.Note that this only concerns the column’s internal representation in the recordsets, not how they are stored on the disk.