I want to know if mysql TEXT data type reserves any space even if there is no data in that row?
I am little confuse. Can anyone provide me any input on this.
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.
Typically, no.
textcolumns are actually stored away from the row, so they don’t take up space on the row, per se. Instead, the row keeps a pointer to thetextcolumn (which does take up space, but only 4 bytes-ish (depends on the system) a row), but thetextcolumn itself will remain empty until you populate it.Now,
varcharcolumns will allocate space for their max at insertion, but only take up the space needed by its contents.charcolumns, however, will always use the space specified. So, here’s what each column looks like with the phrase “waffles”:Hopefully, this helps.