Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jnpr-tjiang opened this issue Dec 29, 2017 · 0 comments
Open

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

jnpr-tjiang opened this issue Dec 29, 2017 · 0 comments
Assignees

Comments

@jnpr-tjiang
Copy link
Contributor

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants