just got paged because someone "optimized" the sql query and forgot to update the logging, now we're trying to figure out why half our customers are getting 500 errors