views:

87

answers:

1

Hi,

I new in database, and dont know how and when mysql allocate memory space.

In MySql Innodb how much storage memory allocation for empty field (no string inserted) vs not empty field?

Other form of my question:

When memory allocated space In MySql Innodb for varchar/text field in time of table creation or when data inserted inside field?

Thank you,

Yosef

+1  A: 

do you mean RAM or disk space?

for disk space, the varchar will not use up space unless there are values in the string.

Randy
Thank you very much, How much its allocated in hard disk if stirng have length 50 char and his column varchar(255)- all 255 chars or only 50?
Yosef
only 50. there is some overhead for the actual row pointers that is fixed, but varchar means variable length character array - char would be fully allocated.
Randy