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://dev.mysql.com/doc/refman/8.0/en/create-table-gipks.html (GIPK mode in MySQL 8.0.30 !)
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]