Re:Extracting timestamp and MAC address from UUIDs
by pbbakkum on Friday November 07, 2014 @08:01PM
(#8575574)
We encountered some of these same issues and wrote this library to mitigate them: https://github.com/groupon/locality-uuid.java. I think UUIDs make good unique ids overall, particularly in distributed environments where id generation can't be coordinated, but should be used carefully, as the article notes.
[ Parent
| on HN ]
Re:Extracting timestamp and MAC address from UUIDs
by X-Istence on Friday November 07, 2014 @11:42PM
(#8576043)
Why not just use UUID 4:
http://en.wikipedia.org/wiki/Universally_unique_identifier#V...
This will have an better distribution for when they are used as keys as well.
Re:Extracting timestamp and MAC address from UUIDs
by e12e on Saturday November 08, 2014 @12:46AM
(#8576151)
As far as I can tell, neither MySQL, nor MariaDB has a function for generating type 4 UUIDs. It's of course possible to generate the UUIDs on the client side, but then it's not really an alternative to auto-incrementing surrogate keys.