3 ms·
Aren't INTs cumbersome in a distributed database? For example If I have two servers running one database, now I have to keep the autoincrement in sync between b
by Vt71fcAqt7 4y ago
Aren't INTs cumbersome in a distributed database? For example If I have two servers running one database, now I have to keep the autoincrement in sync between both before I generate a new one. That's why UUIDs are generally used here if I understand correctly.
- charcircuit 4y agoYou don't need to keep them in sync. You can create a partition for each server to use.
- Vt71fcAqt7 4y agoRight, but now you've added more complexity. So, true, autoint doesn't fail at multiple servers, but it becomes a hassle. Is there a usecase of having ordered IDs in the first place?
- mnutt 4y agoYes, if you outgrow autoincremented ints then hashids may not be a great fit I think?