News for hackers. Stuff that matters.
Re:Moving Away from UUIDs by endisneigh on Monday November 21, 2022 @07:53PM (#33700403)
that doesn't really make sense though. how would you know the range to sort by? presumably you'd use the criterion directly to sort.

a better reason and justification to not use UUIDs is that they take up needless space if you're space constrained. they also have worse performance

Re:Moving Away from UUIDs by postalrat on Monday November 21, 2022 @08:01PM (#33700467)
Maybe you are doing some sort of cursor for pagination or whatever. You can use one ID and fetch the next 50 records. Then use the last ID in those 50 to fetch the next 50, etc.
Re:Moving Away from UUIDs by endisneigh on Monday November 21, 2022 @08:04PM (#33700486)
but you can still do pagination with uuids, your rows can be sorted on any arbitrary criteria like created date or updated date.
Re:Moving Away from UUIDs by postalrat on Monday November 21, 2022 @08:06PM (#33700503)
Dates might not be unique but I can see other possibilities that would be fine.
Re:Moving Away from UUIDs by vanviegen on Monday November 21, 2022 @10:49PM (#33701581)
But that would be slow, even with an index, as compared to using a clustered primary key. Especially when your data doesn't fit in ram.
Re:Moving Away from UUIDs by endisneigh on Tuesday November 22, 2022 @06:01AM (#33704419)
Sure, already mentioned UUID’s being slow. There are trade offs