Hello,
I am looking for a good solution to create unique IDs in a table (entries will
be inserted concurrently by several clients). An ID should be a number less
than 1M, and can be reused after deleted.
I think an auto_increment column won't help here (1M boundary, won't
wrap). Or maybe I could use auto_increment % 1M as the ID (relying on the fact
that the number of rows at a given time is << 1M and there's no fragmentation
- oldest entries are batch processed and removed).
But maybe I'm overlooking a better solution... Any ideas?
Thanks,
--
Adriano
| Thread |
|---|
| • Unique IDs, auto increment & wrap | Adriano Nagelschmidt Rodrigues | 4 May |