3 ms·
At least for the Spanner DB, it's good to have a randomly-distributed primary key since it allows better sharding of the data and avoids "hot shards" when doing
by assbuttbuttass 10mo ago
At least for the Spanner DB, it's good to have a randomly-distributed primary key since it allows better sharding of the data and avoids "hot shards" when doing a lot of inserts. UUIDv4 is the typical solution, although a bit-reversed incrementing integer would work too
https://cloud.google.com/blog/products/databases/announcing-support-for-auto-generated-keys-in-spanner https://cloud.google.com/blog/products/databases/announcing-...