65
you are viewing a single comment's thread
view the rest of the comments
[-] V0ldek@awful.systems 33 points 6 months ago

You also definitely shouldn't be using String non-monotonic UUIDs for primary keys in a database, like, literally ever, but what the fuck do I know, I just do databases for a living, I'm not the all-knowing GPT code wizard.

[-] Imacat@lemmy.dbzer0.com 5 points 6 months ago

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.

[-] mawhrin@awful.systems 13 points 6 months ago* (last edited 6 months ago)

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

[-] froztbyte@awful.systems 13 points 6 months ago

naw bro we've got indexes bro it'll be fine bro

[-] froztbyte@awful.systems 10 points 6 months ago

can't wait for the Clever Idea to offload costly string indices to an external source composed of redis box and some shitfuck app doing tf-idf after a Extensive Research into how to make string lookups be faster

[-] ChairmanMeow@programming.dev 3 points 6 months ago

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.

[-] sinedpick@awful.systems 14 points 6 months ago

so we're calling "not doing pointless unnecessary work" premature optimization now? cool cool

[-] 200fifty@awful.systems 13 points 6 months ago

Making me learn how to do things the right way is premature optimization

[-] ebu@awful.systems 11 points 6 months ago

"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."

[-] froztbyte@awful.systems 2 points 6 months ago

I really should reread that sometime

Also some Mickens

[-] V0ldek@awful.systems 7 points 6 months ago

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

You haven't seen shit then, simple as that.

[-] mawhrin@awful.systems 7 points 6 months ago

why is it always programming dot dev?

load more comments (44 replies)
load more comments (52 replies)
this post was submitted on 13 Jun 2024
65 points (100.0% liked)

TechTakes

1491 readers
25 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