this post was submitted on 13 Jun 2024
1 points (100.0% liked)

TechTakes

1879 readers
19 users here now

Big brain tech dude got yet another clueless take over at HackerNews etc? Here's the place to vent. Orange site, VC foolishness, all welcome.

This is not debate club. Unless it’s amusing debate.

For actually-good tech, you want our NotAwfulTech community

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 11 months ago (46 children)

UUIDs make great primary keys in some applications. If you generated 100 trillion UUID4s, there’s about a 1 in a billion chance of finding a duplicate. Thats usually good enough for my databases.

The issue here was that they used a single UUID instead of generating a new one for each record.

[–] [email protected] 0 points 11 months ago* (last edited 11 months ago) (12 children)

they also stored this thing as a fucking string. looking up strings is costly.

[–] [email protected] 0 points 11 months ago (9 children)

This sounds like a case of premature optimization to me. We have plenty of databases using strings as Ids and they're all more than fast enough for any of our purposes. And that's with considerable volume going through.

I've never seen bad performance from string ids be an issue.

[–] [email protected] 0 points 11 months ago (2 children)

"what are you talking about? a hammer removes bolts just fine. i personally don't have an issue with the tiny bit of extra elbow grease to wedge the claw around the bolt-head and twist; if anything, it's saving me effort from having to use a wrench."

[–] [email protected] 0 points 11 months ago

I really should reread that sometime

Also some Mickens

[–] [email protected] 0 points 11 months ago

See https://programming.dev/comment/10515517 There's good reasons to use something like a uuid over integers.

load more comments (6 replies)
load more comments (8 replies)
load more comments (41 replies)