Is there much in the way of a performance difference between having a SUM calculation inside a SQL query vs calculating it in a variable after the query?
Not the greatest example but:
IFNULL(AVG((service + value + quality)/3),0) AS business_average
vs
$average_rating = ($value + $quality + $service) / 3;
Only the calculation I'm using is pretty damn extensive - I prefer the variable method as it's more readable, not I can put that aside if the performance is greater via the SQL query