Answer the question
In order to leave comments, you need to log in
How are varchars stored in Innodb?
How are varchars stored in Innodb?
As far as I know, together with the table. But if the field is updated to a longer text (for example, it was 'qwe', but it became 'qwerty'), where is the "surplus" ('rty') written? If, unlike char, the extra space is not reserved (by zeros/spaces), and you can't just "append" 'rty' next to it. It turns out that when updating varchar with different text, the text will be stored in pieces in different parts of the table? Well, with frequent changes in different lengths, do you get something extremely fragmented?
Answer the question
In order to leave comments, you need to log in
varchar has a fixed length and space is reserved for it. No difficulty.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question