UUIDv7 doesn't have the properties you think it does
Alexander Schwartz explores the common misconceptions about UUIDv7, a version of the Universally Unique Identifier (UUID) algorithm, which is being considered for adoption in the next version of the Internet Engineering Task Force's (IETF) RFC 4122 standard. Schwartz argues that many developers assume UUIDv7 to be an improvement over UUIDv4, as it is designed to be faster and more compact, but this is not necessarily true. In fact, Schwartz claims that UUIDv7 can be slower and less compact in certain scenarios. He attributes this to the way UUIDv7 generates its variant, which is based on the time and sequence number of the host system, whereas UUIDv4 uses a cryptographically secure pseudo-random number generator. Schwartz also notes that UUIDv7's smaller size can actually make it more vulnerable to collisions, especially when used in certain databases. The article concludes by highlighting the need for developers to carefully evaluate the trade-offs between different UUID versions and choose the one that best suits their needs.
Read the full article at alexsci.com →