4 ms·
With the shift to utf8mb4, are indexes / keys still stored as the maximum possible length (ie length *4 bytes)? and is the maximum key length still ~750 bytes?
by jlawer 10y ago
With the shift to utf8mb4, are indexes / keys still stored as the maximum possible length (ie length *4 bytes)? and is the maximum key length still ~750 bytes?
I asked some of my developers to look into converting to utf8mb4 from utf8 in one of our legacy codebases, but we hit a problem with indexed fields that were defined as varchar(255).
- morgo 10y agoThis was fixed by a defaults change in MySQL 5.7. You can actually make 5.5+ support larger key lengths, but it requires: * Table created with ROW_FORMAT=DYNAMIC * innodb_file_per_table ON * innodb_large_prefix ON * innodb_file_format set to Barracuda Yes it's a pain. We've been working a lot harder on defaults since 5.6+ Here's a list of what we are looking at changing in 8.0: http://mysqlserverteam.com/planning-the-defaults-for-mysql-5-8/ http://mysqlserverteam.com/planning-the-defaults-for-mysql-5... http://mysqlhighavailability.com/mysql-replication-defaults-after-5-7/ http://mysqlhighavailability.com/mysql-replication-defaults-...
- deleted 10y ago[deleted]