News for hackers. Stuff that matters.
Re:Unexpected downsides of UUID keys in PostgreSQL by dloreto on Wednesday June 28, 2023 @12:10PM (#36508550)
The stated downsides come from poor data locality when using mostly random UUIDs; but you can keep most of the benefits of a globally unique identifier, and retain locality, by using UUIDv7.

At jetpack.io we've been doing exactly that via TypeIDs: https://github.com/jetpack-io/typeid and there's a PostgresSQL implementation available. TypeIDs are UUIDv7 with additional type information, so you also get type-safety in your IDs.

There are no comments on this comment yet.