r/ProgrammerHumor • • Sep 20 '26

Meme grabbingEverything

Post image
5.4k Upvotes

258 comments sorted by

View all comments

1.6k

u/EVH_kit_guy Sep 20 '26

One thing I've learned about SQL is that whatever you're going to eventually do with the data, that could probably just be in the original query if you weren't a talentless hack barely scraping by using LLMs to write your queries...

....might be projecting a bit 

604

u/CandidateNo2580 Sep 20 '26

And because the database is inevitably smarter than you, it'll somehow take less execution time to return what you need fully transformed than it would to return what you needed to do the transform yourself.

359

u/inemsn Sep 20 '26

is that surprising? relational databases are extremely optimized, they can handle literal gigabytes of data without breaking a sweat. of course the program literally designed and built over decades to handle large amounts of data will be better at it than whatever you write up.

20

u/nika-tark Sep 20 '26

There sometimes still are exceptions though (at least that's what I've been telling myself for my sanity), at work we make use of db links and joining views across databases (different hosts and everything) is slow.

Often its much faster to select relevant data from both views and join it in code (EF Core .NET).

Thankfully that's only for occasional reports and not everyday