top | item 36813104

(no title)

ericHosick | 2 years ago

UUIDs can serve different purposes. As others have mentioned, database performance on inserts might trump the need for difficult to guess UUIDs.

In other cases, the UUID needs to be as random as possible.

It really depends on the use case.

discuss

order

SV_BubbleTime|2 years ago

Yea. This is an easy one. We use both.

For our “session” records, it’s a UUIDv7. This sorts beautifully, and if I wanted to, I could look at a log and easily see all the entries in a particular session.

For a larger db, we just need unique entries and at least in Dynamo, it is an advantage to equally distribute them as much as possible. UUIDv4 there.