3 ms·
The optimization was made at a different time in history. As I wrote in another comment here: while the decision is regrettable, because of a desire for backwa
by morgo 8y ago
The optimization was made at a different time in history. As I wrote in another comment here: while the decision is regrettable, because of a desire for backwards compatibility and simplified upgrade there wasn't an easy way out of it.
The utf8[mb4] support in MySQL 8.0 is much better than prior releases. The team worked really hard on eliminating the use cases for utf8mb3 (performance) so that "just use the default of utf8mb4" can work for everyone.
- jeltz 8y agoIs it really an optimization? I always assumed they picked 3 bytes to make sure a varchar(255) still would fit within the InnoDB field size limit of 768 bytes, so they could avoid/postpone having to fix InnoDB to support variable size fields.
- morgo 8y agoThis decision was made before InnoDB was the default. While the performance differences are historical now, consider the case that because of fixed sized buffers, one query could switch from a temp table in memory to a temp table on disk. The profile of the query has effectively changed.
- jeltz 8y agoYes, but did it happen before InnoDB was widely used?
- JdeBP 8y agoYou haven't answered my question at all, which was whether this optimization (as you put it) was the choice not to define that macro.