Re:Mistakes Beginners Make When Working with Databases
by Jweb_Guru on Wednesday June 08, 2016 @01:00PM
(#11863704)
Granted re: UUIDs. There are definitely tradeoffs here (time precision / inserts per second [in practice you'll just end up throttling or massaging the timestamp if you do have insufficient granularity] vs. number of supported partitions vs. ability to efficiently route a path to the key vs. fast reservation ability vs. key size, etc., etc.). I was referring to the notion of a global 128-bit pseudorandom number as the final solution to everything... things are rarely that straightforward.
Re:Mistakes Beginners Make When Working with Databases
by TheCoelacanth on Wednesday June 08, 2016 @03:11PM
(#11864759)
Of the five UUID versions, only version 4 is pseudorandom. The other four versions are completely non-random.
If you do use this scheme, be careful that your timestamp is sufficiently granular that it's not possible to generate two identical IDs in quick succession....