You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I feel using GUIDs (partially sequential - MySQL 8+ seems to come with built-in support for these via UUID_TO_BIN) for our primary keys gives us some quite nice benefits. I'm thinking towards the future for scaling/replication and generating indexes on the front-end (possibly even in some kind of offline mode). I guess this would also make merging separate databases easy, which might be helpful for future migrations.
We would need to discuss some of the cons too, like disk usage (16 bytes rather than 4 for each key) and any performance costs (I've never used GUIDs in MySQL before).
Although not a priority, it's a fairly simple change that would make sense to do before any real sites are using the system. Any opinions?
The text was updated successfully, but these errors were encountered:
theninja
changed the title
Should we consider using GUIDs rather than incremental integers for primary keys?
Should we consider using GUIDs rather than incrementing integers for primary keys?
Nov 19, 2017
I feel using GUIDs (partially sequential - MySQL 8+ seems to come with built-in support for these via
UUID_TO_BIN
) for our primary keys gives us some quite nice benefits. I'm thinking towards the future for scaling/replication and generating indexes on the front-end (possibly even in some kind of offline mode). I guess this would also make merging separate databases easy, which might be helpful for future migrations.We would need to discuss some of the cons too, like disk usage (16 bytes rather than 4 for each key) and any performance costs (I've never used GUIDs in MySQL before).
Although not a priority, it's a fairly simple change that would make sense to do before any real sites are using the system. Any opinions?
The text was updated successfully, but these errors were encountered: