r/ProgrammerHumor • • 2d ago

Meme productionIsNotReadyForThis

Post image
0 Upvotes

19 comments sorted by

41

u/bjorneylol 2d ago

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

8

u/BugFeaturesOnly 2d ago

Hey, I had to protect her identity from Skynet somehow

1

u/OmegaPoint6 1d ago

Thats actually skynet's honeypot account

6

u/ReapBoyz 2d ago

address me

1

u/Key_River7180 2d ago

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

2

u/gaaasstly 2d ago

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

1

u/Key_River7180 2d ago

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

2

u/KeyAdhesiveness9481 2d ago

In postgres, int8 is 8 bytes, 64 bits.

1

u/Key_River7180 2d ago

typical postgres

1

u/gaaasstly 2d 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 1d ago

DO NOT USE AUTO INCREMENT NUMBERS FOR PRIMARY KEYS

1

u/razor_train 1d ago

There are plenty of cases where autoincrement is completely valid.

2

u/ruiz_julie_728 1d ago

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

0

u/ArtVandelayVienna 19h ago

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

1

u/FabioTheFox 19h ago

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

1

u/ArtVandelayVienna 7h 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 6h 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

0

u/[deleted] 2d ago

[deleted] — view deleted comment

11

u/fr000gs 2d ago

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