4 ms·
I really like prefixed identifiers and strongly recommend using them from the beginning. One question: I’ve seen people use both integer IDs (as the primary ke
by tlrobinson 3y ago
I really like prefixed identifiers and strongly recommend using them from the beginning.
One question: I’ve seen people use both integer IDs (as the primary key) and prefixed GUIDs (for APIs) on the same table. This seems confusing and wasteful. Is there a valid reason to do that, and is it common? Performance when doing joins or something?
EDIT: it sounds like that’s the reason for them to be “K-Sortable”:
> TypeIDs are K-sortable and can be used as the primary key in a database while ensuring good locality. Compare to entirely random global ids, like UUIDv4, that generally suffer from poor database locality.