database - I cant seem to find a pleasing answer for this on the web for this specfic question, "In MySQL do colums that have 'NULL' waste memory"? -
Taken from one of my previous questions.
The table is showing which item (post, photo or reply) is being commented on.
commentid ---- postid ----- PHOTOID ----- replyid ------------------------- ---------------------- 1 22 Zero zero 2 Zero 56 Zero 3 23 Zero zero 4 Zero zero 55 5 26 Zero zero ......... .. .
Is this bad?
After
will be a better structure ...
commentid Itemid itemtype - -------------------------- 22 22 Posts 2 56 Pictures 3 23 Posts 4 55 Replies 5 26 Posts
< P> You can also add an index that combines the item code and column of the item type, so that it is fast to see all the comments for all the countryside rticular items.
Comments
Post a Comment