ids
UUID
Generate v4 and v7 in bulk, and decode the timestamp buried inside a v7.
Decode one
v7 puts a millisecond timestamp in the high bits, so the ids sort chronologically and land next to each other in a B-tree index. That is the whole reason to prefer it over v4 for a database key, and the reason not to use it where the creation time is a secret.