Does Mysql Text DataType reserves any memory space Does Mysql Text DataType reserves any memory space mysql mysql

Does Mysql Text DataType reserves any memory space


Typically, no. text columns 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 the text column (which does take up space, but only 4 bytes-ish (depends on the system) a row), but the text column itself will remain empty until you populate it.

Now, varchar columns will allocate space for their max at insertion, but only take up the space needed by its contents. char columns, however, will always use the space specified. So, here's what each column looks like with the phrase "waffles":

varchar(15): 'waffles'char(15):    'waffles        'text:        'waffles'

Hopefully, this helps.