Why v7 for database keys
Random v4 keys are inserted all over a B-tree index, which slows down writes and wastes space as tables grow. A v7 UUID starts with a 48 bit Unix timestamp in milliseconds, so new rows land at the end of the index, just like an auto increment number, while the IDs stay globally unique and safe to generate on any server or client.
The remaining bits are random, with a counter inside the same millisecond so a batch generated at once is strictly ordered.
Check the timestamp
Paste a v7 UUID into the decoder below to see the exact time it was created. Generation and decoding happen in your browser.