Hacker News new | ask | show | jobs
by bazzargh 4331 days ago
You're storing 6-char base-32 values, so 1073741824 possibilities, but you've got 50-50 chance of collision after 38582 values - that's not a lot, the birthday paradox bites again! Using much larger random values or hashes gives you a better safety margin.
1 comments

I also have a unique constraint on the value and re-run the generator if there's a collision.
That is something that hashid avoids.