News for hackers. Stuff that matters.
Re:In MySQL, use “utf8mb4” instead of “utf8” (2016) by isotopp on Friday January 14, 2022 @01:38PM (#29938291)
Back then MySQL used the memory engine for implicit temporary tables, and memory engine has no variable width data types. So a "varchar" becomes a "char", and a "varchar(255) charset utf8" becomes an allocation of six times 255 = 1530 bytes (filled with a lot of padding).

Reducing this to 3 bytes is still bad, but only half as bad as before.

Only MySQL 8 introduced innodb typed temporary tables (unlogged, even), so with MySQL 8 this is no longer a problem.

There are no comments on this comment yet.