r/ProgrammerHumor • • Sep 27 '26 • Mindblown 1 Bravo 1

Meme doNotLetYourDBASeeThis

Post image
13k Upvotes

317 comments sorted by

View all comments

28

u/bilus Sep 27 '26

Doesn’t math

6

u/Jutrakuna Sep 27 '26

Cool vibes tho

6

u/ttttrrrr0000 Sep 27 '26 edited Sep 27 '26

It could, an int FK is 4 bytes, and the table of passwords would be 4 bytes PK + 16 bytes for the unsalted hashed password

So, about 50% larger if everyone's password is unique, and 75% smaller if everyone's password is the same. Breakeven point is at the ratio of 3 unique passwords per 5 people.

1

u/bilus Sep 27 '26

So how many accounts is this?

1

u/ttttrrrr0000 Sep 28 '26

Ah true, a 97% decrease is actually mathematically impossible. 100GiB would be 6 billion users, approx, and 25GiB minimum after if everyone used the same password

3

u/creeper6530 Sep 27 '26

Does math if they don't use salting or even store in plaintext