Re:Ask HN: How should I create a unique id for entries that ...
by Jeremy1026 on Wednesday December 10, 2014 @12:34AM
(#8727845)
Base62 encoded incremental IDs
[ Parent
| on HN ]
Re:Ask HN: How should I create a unique id for entries that ...
by smt88 on Wednesday December 10, 2014 @12:36AM
(#8727850)
That's still incremental though. It just looks different.
Re:Ask HN: How should I create a unique id for entries that ...
by Jeremy1026 on Wednesday December 10, 2014 @09:24AM
(#8729248)
bigint gives you 9.2 quintillion options before you run into a collision. Which is obviously not forever proofed, but certainly future proofed.
Re:Ask HN: How should I create a unique id for entries that ...
by smt88 on Wednesday December 10, 2014 @05:42PM
(#8732182)
OP isn't asking for a data type that can hold more than a billion records.
OP needs a way to generate a random ID without checking that the ID has already been used -- s/he wants a UUID. Bigint is FAR too small to do that a billion times without a collision.