3 ms·
> surrogate keys can be fixed size integers This launches into the other debate about PKs: using UUIDs rather than sequential keys.
by mrkeen 2y ago
> surrogate keys can be fixed size integers
This launches into the other debate about PKs: using UUIDs rather than sequential keys.
- sgarland 2y agoThis is less of a debate, and more of an indicator of who has had to work with a DB at scale using UUIDv4 everywhere. Don’t blow up your B+trees.
- mrkeen 2y agoI guess. Either your system is happy enough to route every new entity through "one DB at scale" so it can let your "one DB at scale" be in charge of an auto-incrementing long, or it isn't.
- sgarland 2y agoA common method is to have a small app (which can quite easily be HA) that hands out sequential chunks to each shard, interleaving and/or gapping as necessary.