so I have a table which is going to potentially contain quite a few empty or "null" values. (a comments table) This is due to several items being optional.
I am also looking into my table design (splitting the table into three and reducing entries rather than putting null entries in)
So what I am wondering is should i just leave colums blank? or put "null" into the coloums? What takes up more space and considering i wont be querying for "null" values I have no need for anything to be in there. - if it contains no value its not used.
Thanks
p.s im myisam and innodb
to null or not to null!
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: to null or not to null!
From a performance standpoint, there is extremely little difference. However null would technically be faster.
Re: to null or not to null!
I'm not sure it's true for MySQL, but I have read that "NULL values are not good for indexies".
There are 10 types of people in this world, those who understand binary and those who don't