Php & mySQL: space occupied by TEXT column

I have a column with its structure as TEXT. I would like to know how much space 3 lines take, given the following data in it in the TEXT column.

       TEXT column
ROW1
ROW2   Hi
ROW3   ABCDEFGHIJKLMNOPQRSTUVWXYZ... (really long, let say 1500 characters)

      

We have 3 lines above. Line 1 is empty. There are only 2 characters in Row2. And Row3 has up to 1500 characters. So I would like to know what space is taking up:

Row1:

Page 2:

Row3:

The manual says: TEXT: L + 2 bytes, where L < 216

but I am a bit confused about how this works in the above cases. I also ask this because I am thinking about normalizing my DB depending on the space occupied by the TEXT column since my application uses them a little.

Thanks.

+2


a source to share


1 answer


No, the other cells are not max-aligned if that is what you asked for.
So this is nothing more than the actual size of the data stored in these fields



What do you call "normalization"?

+3


a source







All Articles