BuildUtilities

What is a UUID v7?

A time-ordered UUID, sorts by creation time, so it plays nicely with database indexes.

UUID v7 starts with 48 bits of Unix-millisecond timestamp, then random bits. The result still looks like a normal UUID but sorts by creation time.

Why care? When you use UUIDs as primary keys in a database, v4 scatters inserts across the index (bad for cache locality). v7 keeps recent inserts together, far less index bloat, much faster bulk inserts.

Adopted in 2024 as part of RFC 9562. If you're picking a UUID version for new code, v7 is usually the right default.

Related tools

Keep reading

Tip Jar