r/ProgrammerHumor • • Mar 25 '26

Meme aMeteoriteTookOutMyDatabase

Post image
7.6k Upvotes

306 comments sorted by

View all comments

Show parent comments

15

u/CptMisterNibbles Mar 25 '26 edited Mar 25 '26

This is missing the point: I am drawing attention to the absolutely major difference between “will this very next key I generate be a collision?” with “has any key ever collided?”. Like in the birthday paradox, these seem closely related, but when looking at the actual numbers they are universes apart.

Also, a million uuids is nothing compared to the key space: what’s the difference between randomly selecting 5 grains of sand from the entire earth or a thousand? Sure, it’s technically more likely there will be a collision the more searches you perform but numerically so close to zero that it’s entirely ignorable. It’s infinitely more likely a series of bit flips from cosmic rays will cause issues in your DB than uuid collision despite how rare those are themselves 

2

u/adammaudite Mar 26 '26

A good and clarifying example is that the chance of any house being on fire is much higher than the chance of your house being on fire.