And you can use it today with Postgres uuid type. Postgres doesn’t care what you store in it as long as it has the correct length. So you can generate a uuidv7 and store it natively
Wouldn’t the index types need to be updated to support ordering on UUIDs?
Goodbye integers, hello UUIDv7
11–20 of 376 posts
Re: Goodbye integers, hello UUIDv7
#12Re: Goodbye integers, hello UUIDv7
#13I find it interesting that it’s quoted random IDs are bad for performance, because it’s actually better for distributed storage systems because you don’t hotspot on a single node. For example see: https://stackoverflow.com/a/53901549 and https://medium.com/google-cloud/cloud-spanner-choosing-the-r...
UUIDv7: Timestamp up front, random in the back.
Re: Goodbye integers, hello UUIDv7
#14Re: Goodbye integers, hello UUIDv7
#15I find it interesting that it’s quoted random IDs are bad for performance, because it’s actually better for distributed storage systems because you don’t hotspot on a single node. For example see: https://stackoverflow.com/a/53901549 and https://medium.com/google-cloud/cloud-spanner-choosing-the-r...
(Or just reverse the bits, take the last n, etc)
Re: Goodbye integers, hello UUIDv7
#16I find it interesting that it’s quoted random IDs are bad for performance, because it’s actually better for distributed storage systems because you don’t hotspot on a single node. For example see: https://stackoverflow.com/a/53901549 and https://medium.com/google-cloud/cloud-spanner-choosing-the-r...
Re: Goodbye integers, hello UUIDv7
#17[1]: https://github.com/segmentio/ksuid which has very similar use cases.
Re: Goodbye integers, hello UUIDv7
#18Unless you consider users being able to extract the generation time from the id to be an issue, of course.
Re: Goodbye integers, hello UUIDv7
#19> We use sequential primary keys for efficient indexing, and UUID secondary keys for external use. The upcoming UUIDv7 standard offers the best of both worlds Unless you consider users being able to extract the generation time from the id to be an issue, of course.