Avoid UUID Version 4 primary keys

3 points by knedl


Al3xFor

The article doesn't mention ULID and I thought that might be relevant, not sure how that compares to UUIDv7 though. PS I didn't know they were a thing until I noticed this: https://lobste.rs/s/7fsqgl/ulid_only_identifier_you_should_use

Irene

I would have thought that the indexing problem the piece talks about would apply to any UUID format which involves hashing its inputs, which as I recall is most of them. It would have been nice to see that addressed in the piece. I would also have liked to see discussion of the privacy tradeoffs of the different UUID formats.

It seems like the real point here is that randomly distributed values have performance characteristics which may come as a surprise to some people. That's an important point, I'm just not sure how much of it is UUID-specific.