this post was submitted on 23 Dec 2023
111 points (95.1% liked)

Programming

17432 readers
260 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Mbourgon@lemmy.world 4 points 10 months ago (1 children)

So they hit the production database or do you have it mirrored or replicated? And when everybody is running their queries overnight because the “database is slow”… not knowing SARGability? Yes, there’s a place, but “simple queries” are rarely.

[–] hpca01@programming.dev 2 points 10 months ago (1 children)

For my team I have a mirror that I set up and have a bunch of ELT jobs that load the deltas every night. Queries don't ever run in PROD, if someone needs a specific view or more data, they go through me and my team. I also set timeouts, precisely to avoid the ahole from using Select * from. Also have a bunch of reports I created to see who is running what queries and timings. We review them quarterly or when someone complains or when a project that needs our data asks us for access.

We also have an autogenerated data dictionary for folks to use as well. Generally I don't entertain any "it's slow" complaints unless they go through the documentation, provide their exact query and write what it is they're trying to get.

My assumption was that OPs shop does the bare minimum in terms of making sure they don't shoot themselves in the foot.

[–] Mbourgon@lemmy.world 2 points 10 months ago

Nicely done, dude.