More and more people are using UUID’s to identify records in their database.
As you already know, for MySQL’s storage engine (InnoDB) the primary key is very important ! (for performance, memory and disk space).
See the following links:
- https://lefred.be/content/mysql-invisible-column-part-ii/
- https://dev.mysql.com/doc/refman/8.0/en/create-table-gipks.html (GIPK mode in MySQL 8.0.30 !)
Problems
There are 2 major problems having a UUID as Primary Key in InnoDB:
- generally they are random and cause clustered index to be rebalanced
- they are included in each secondary indexes (consuming disk and memory)
Let’s have a look at …
[Read more]