Re:Auto increment is a terrible idea
by cm2187 on Thursday November 30, 2017 @09:10AM
(#15815776)
Agree. And if you have two clusters, they will start at different IDs. Which is why I would probably prefix them with a timestamp (if it is not a sensitive information). Say the number of seconds since 1-1-2000. Fits on 32 bits, that still leaves you with 96 bit of entropy for a UUID, which is plenty to guarantee uniqueness unless you are working at massive scale.
[ Parent
| on HN ]
There are no comments on this comment yet.