6 ms·
Article should be called "Totally Expected Downsides..." If you want temporal locality, use ULIDs instead.
by zero_iq 3y ago
Article should be called "Totally Expected Downsides..."
If you want temporal locality, use ULIDs instead.
- rjh29 3y agoI was going to use UUID with the time portion at the start (also known as UUIDv7) but this looks better.
- heipei 3y agoI've been thinking about converting a legacy application which uses UUIDv4 to use ULIDs instead going forward, but then to represent these ULIDs in a format that is compliant with a UUIDv4. I have not thought through the possible downsides, but I think it should be a pretty straightforward change. Of course old records will remain true random UUIDv4s, but at least new records will be time-order and as such will create less stress on the B-Tree index when writing them.
- gmhafiz 3y agoOne potential downside is ULID does not have an RFC, unlike UUID V7
- samokhvalov 3y agoHopefully, it will soon have it: https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc...
- OJFord 3y agoIt's only mentioned there in 'motivation', a study of trends?
- rjh29 3y agoGood point. It has libraries in most languages and that's good enough for me, but might be a problem if you're interfacing with other projects.
- ants_a 3y agoThe unexpected part for me was not the lack of temporal locality, but which cache it thrashed. The whole dataset fits into buffer cache so one might think that the lack of locality is not that important...