[TYPO3-dev] Why have boolean database fields types like tinyint(4) etc?

Sebastian Gebhard sebastian.gebhard at googlemail.com
Thu Nov 12 08:53:17 CET 2009


Hi,

every few days I ask myself why pages.hidden has field type tinyint(4), today it's different - I ask you.

Almost all "boolean" database fields in TYPO3 core and in extensions produced by the kickstarter have tinyint(4),
an exception is pages.delted which is tinyint(1).

According to the ANALYSE() PROCEDURE of MySQL the optimal field type for these fields would be ENUM('0','1') NOT NULL.

I'm not a database expert, but afaik tinyint(4) requires more diskspace than ENUM('0','1') and is slower.
Would it not be better to change this?

Kind regards,
Sebastian




More information about the TYPO3-dev mailing list