0

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

Ben
  • 25,389
  • 34
  • 109
  • 165

1 Answers1

1

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
  • 16,480
  • 1
  • 37
  • 55
  • 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? – Ben Jun 06 '10 at 06:38
  • 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 Jun 06 '10 at 21:32