mysql - Memory allocation for mediumtext field with limit set at a lesser value -
mysql - Memory allocation for mediumtext field with limit set at a lesser value -
in rails migration, 1 of field defined as
t.text :message, limit: 8.megabytes - 1
mysql maps field mediumtext datatype. mediumtext can store info upto 16megabytes.
my question is, how mysql handle internally? how much memory allocated message field, 8megabytes or 16megabytes? save memory or same if write migration field
t.text :message, limit: 16.megabytes - 1
mediumtext needs much space actual text stored plus few bytes administration. database size doesn't matter.
the difference in rails allow store in there. in first version allow store 8 megabytes , in sec version 16, though database allow 16.
this create problems if write in filed externally. if long, rails complain when seek read , modify it.
mysql ruby-on-rails memory-management
Comments
Post a Comment