3 ms·
Ulid: Universally Unique Lexicographically Sortable Identifier
- rhelz 3y agoA question: why include a timestamp? Why not just 80 or 128 bits of pure randomness---if somebody needed a timestamp they could always just append it themselves. And, it seems to me, there would be many instances where you didn't need or want the timestamp.
- zzo38computer 3y agoIt seem that, they want it to be sortable, like the title says. Due to that, it is helpful to include a timestamp. (If you do want a random identifier instead, then you can use that instead, I suppose.)
- rhelz 3y agoYeah, but timestamp is only one of the keys you might like to sort on. To sort on anything else you'd have to augment the UUID anyways....why is a timestamp so important that it is put in every UUID, whether the user needs it or not?
- illuminant 3y agoClustering. Without which indexes would be less efficient.
- rhelz 3y agoThx. That's a good answer.
- erik_seaberg 3y agoUnless you have a single monotonic clock, these will be partially ordered. It's risky to design around sorting that won't always work.