Juniper / contrail

Contrail repo for core components (go based)
Apache License 2.0
44 stars 32 forks source link

Change primary key (uuid) from varchar(255) to binary(16) #31

Open jnpr-tjiang opened 6 years ago

jnpr-tjiang commented 6 years ago

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/