CHAR
has a nasty side. ANALYSE()
predates character sets, and its code was probably not updated to take into account that English text in CHAR(...) utf8mb4
wastes 3/4 of the space! Also, there was some utility of MyISAM row_format=fixed, but such is now useless in the default InnoDB.
Bottom line: ignore its advice about CHAR
unless you (1) really have fixed length strings and (2) have specified an appropriate CHARACTER SET
.
I would not change TIMESTAMP
to CHAR(19)
because (1) the explosion of space due to utf8, and (2) you would lose the timezone adjustment that exists currently in the table, and (3) CHAR(19)
is a lot bigger than the footprint of TIMESTAMP
(4 bytes previously, now 5-8), and (4) ANALYSE()
probably has not been updated to understand microseconds.
DATETIME
, on the other hand does not have the timezone issue. But points 1,3,4 still apply.