norv/SMF3.0 — pull request #2 by boulder-dk (2012-06-30 23:08:32+00:00)
Title: Jump on the MySQL 5.x wagon - It doesnt hurt I promise.

Hi

I used a couple of years of my hardcore MySQL experience to review the ./SMF3.0/core_tables.sql and I have a few suggestions.

1) Use innoDb - a CMS / forum should be transaction safe. There shouldn't be any problems with running on InnoDb vs MyISAM. InnoDB has gone through major performance upgrades in the MySQL 5.x series.

2) Dont use tinyint/smalint/mediumint your just lying to yourself - MySQL omits them all to int ... and the (x) determines how many digits to show. Meaning tinyint(1) takes up 32 bit (4-bytes) of space and the first digit will be show in selects. So write int(1) instead so you can see the actual amount of data consumed aka not lying to yourself.

3) Dont use DEFAULT '' <- Use NULL instead of empty string. Empty strings should implicitly mean something was set to empty (A system/user action) ... where as NULL has the implicit meaning that this value was never set (user/system inaction). It you default to an empty string you don't know if it was user/system action or inaction, besides - what value does an empty string add to the system .. none, so don't let it take more space than necessary.