5 ms·
How about hashing the incremental? Now I wonder how ids like imgur or youtube work.
by Rainb 12y ago
How about hashing the incremental?
Now I wonder how ids like imgur or youtube work.
- Jeremy1026 12y agoBase62 encoded incremental IDs
- smt88 12y agoThat's still incremental though. It just looks different.
- Jeremy1026 12y agobigint gives you 9.2 quintillion options before you run into a collision. Which is obviously not forever proofed, but certainly future proofed.
- smt88 12y agoOP 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.