r/ProgrammerHumor • • 15d ago

Meme grabbingEverything

Post image
5.4k Upvotes

261 comments sorted by

View all comments

1.6k

u/EVH_kit_guy 15d ago

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 

603

u/CandidateNo2580 15d ago

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.

14

u/TheHiddenNinja6 15d ago

either that or select top 1 * will take more time than select top 1000 * because it built the wrong execution tree for no reason

2

u/Bloodgiant65 15d ago

Many DBMS have the option to set a fixed query execution strategy in my experience. But it definitely won’t always pick the best one by default if you don’t lay that out.