5 ms·
What problem does this solve? Why is it necessary to sort a unique id?
by Kip9000 8y ago
What problem does this solve? Why is it necessary to sort a unique id?
- marksomnian 8y agoSince the ids are generated chronologically, it means you can sort by id instead of created_at. A nice convenience for sure.
- taeric 8y agoIt can help operations if you know when an id came from. So that when you get a request id from a user, you don't also have to get a when.
- mcbits 8y ago> when you get a request id from a user Just a public service reminder that "never trust the client" still applies, in case you were imagining user agents generating their own ULIDs to relive servers of the duty or something. Nothing prevents them from sending duplicate or out-of-order IDs.
- taeric 8y agoI've always been intrigued by having clients provide the id. I think I understand why that choice is made, but it does seem unusually error fragile.
- BugsJustFindMe 8y agoThis comes out of Twitter Snowflake. The "prior art" links at the bottom are pretty informative.
- UK-Al05 8y agoUsing a ULID in a Clustered index?