Goodbye integers, hello UUIDv7

At Buildkite, we have used sequential primary keys and UUID secondary keys for storing data. However, the upcoming UUIDv7 standard offers the best of both worlds by providing time-ordered UUID primary keys that can be used for indexing and external use. UUIDs have gained popularity as database keys due to their uniqueness and ability to be generated independently. They eliminate the need for coordination in distributed database environments and provide an extra layer of security. The random nature of standard UUIDs can cause performance issues when used as primary keys, which led us to experiment with time-ordered UUIDv4. Eventually, we adopted UUIDv7 as the primary key for all new tables, which improved database performance and simplified application logic. Despite some trade-offs, UUIDv7 is a practical and future-proof choice for Buildkite. We are excited about the potential of UUIDv7 becoming an IETF Proposed Standard.

https://buildkite.com/blog/goodbye-integers-hello-uuids

To top