Hacker News new | ask | show | jobs
by Rainb 4203 days ago
How about hashing the incremental? Now I wonder how ids like imgur or youtube work.
1 comments

Base62 encoded incremental IDs
That's still incremental though. It just looks different.
bigint gives you 9.2 quintillion options before you run into a collision. Which is obviously not forever proofed, but certainly future proofed.
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.