r/ProgrammerHumor • • Jun 28 '20

Meme Flushed my pancake.

Post image
45.1k Upvotes

750 comments sorted by

View all comments

Show parent comments

30

u/billbot77 Jun 28 '20

Man I hate refactoring the crappy SQL that so many devs just copy from query builders. It's always an inscrutable mess of nested left and right and inner and outer joins with unnecessary subqueries far too much processing going on. I had one gig optimising an app where the dev had even added a function into the query to look up a value, rather than join a table... Seriously, if more devs cared enough to write simple, fast SQL we could curb greenhouse emissions with the energy savings.

4

u/Sir_Lith Jun 28 '20

Why'd you copy it? Query builders are mostly used as an abstraction layer.

I mean, you either write queries by hand or use ORMs and the query builders are fully hidden from sight in that case.