r/ProgrammerHumor • • 7d ago

Meme productionIsNotReadyForThis

Post image
0 Upvotes

20 comments sorted by

42

u/bjorneylol 7d ago

Thank god you censored the bottom half of a single character of sarah connors email address

8

u/BugFeaturesOnly 7d ago

Hey, I had to protect her identity from Skynet somehow

1

u/OmegaPoint6 6d ago

Thats actually skynet's honeypot account

6

u/ReapBoyz 7d ago

address me

1

u/Key_River7180 7d ago

prod is not ready for 3 users with the same key thing after the primary key thing overflows

2

u/gaaasstly 7d ago

Isn't the PK id (int8) which is a 64-bit value?

1

u/Key_River7180 7d ago

idk coming from c an int8 holds a value from -128 to 128, 8 bit signed int

2

u/KeyAdhesiveness9481 7d ago

In postgres, int8 is 8 bytes, 64 bits.

1

u/Key_River7180 7d ago

typical postgres

1

u/gaaasstly 7d ago

No worries. I thought the same thing after reading your comment and then remembered I was looking at a db and not C code.

1

u/FabioTheFox 7d ago

DO NOT USE AUTO INCREMENT NUMBERS FOR PRIMARY KEYS

1

u/razor_train 6d ago

There are plenty of cases where autoincrement is completely valid.

2

u/ruiz_julie_728 6d ago

Auto-increment is fine when one database owns ID allocation; independently writing databases are where another strategy matters.

1

u/ArtVandelayVienna 6d ago

Yeah, sure, in case I need to scale my cake recipe database to 500 servers worldwide.

1

u/FabioTheFox 6d ago

Until you need to merge data or handle backup stuff, just use UUIDV7

1

u/ArtVandelayVienna 5d ago

But the downside:

UUIDv7 = 128 bit = 16 bytes long. Auto-Inkrement based on standard Integer: 4 bytes long.

=> index size x4
=> more IOs, needs more RAM
=> worse cache hit rate
=> bad join performance

1

u/FabioTheFox 5d ago

It performs the same as an auto increment, modern Postgres for example supports it by default and there is no performance hit in both single entity queries and ranged queries or whatever else you need

1

u/_Mentor 1d ago

Sarah is begging to have her gmail phished. She will stick that email anywhere i guess.

0

u/[deleted] 7d ago

[deleted] — view deleted comment

11

u/fr000gs 7d ago

why is there a prod DB and a pricing page on your "side project"