contrail
contrail copied to clipboard
Change primary key (uuid) from varchar(255) to binary(16)
One optimization could be done is to store uuid as binary(16) instead of varchar(255). Because primary key is going to be in every secondary index table and foreign key constraints and index tables need to be cached in mysql memory to get better query performance, it is a big saving if we can reduce the uuid (primary key) from 255 to 16 bytes. Here is a nice posting on uuid as primary key:
https://mysqlserverteam.com/storing-uuid-values-in-mysql-tables/