1

If I have a column CHAR(100) and is allowed to have NULL values, when the value is NULL, how much space will this take?

Also, will there be a performance hit, considering the column will be written only one, never updated and selected a lot of times?

We're All Mad Here
  • 1,544
  • 3
  • 18
  • 46

1 Answers1

2

Before version 5.0.3, the default format is set to "REDUNDANT" : any fixed-length field will use the same space, even if it's value is NULL.

Starting with version 5.0.3, the value is set to "COMPACT" : NULL values will never use any space in your database.

read this for more deatails http://dev.mysql.com/doc/refman/5.1/en/data-size.html

echo_Me
  • 37,078
  • 5
  • 58
  • 78