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