SUM( A + B ) vs SUM(A) + SUM(B) I came across a script written by one of my coworkers and found a line like the following

SELECT SUM(A) + SUM(B) FROM TABLE


I proposed a different approach 

SELECT SUM( A + B ) FROM TABLE


Which line is most efficient?
For the InnoDB/MySQL 5.6 table with 30M+ rows of FLOATs result is the next.

select SUM(x + y) from points;
/* Affected rows: 0  Found rows: 1  Warnings: 0  Duration for 1 query: 8,596 sec. */

select SUM(x + y) from points;
/* Affected rows: 0  Found rows: 1  Warnings: 0  Duration for 1 query: 8,799 sec. */

select SUM(x) + SUM(y) from points;
/* Affected rows: 0  Found rows: 1  Warnings: 0  Duration for 2 queries: 8,720 sec. */

select SUM(x) + SUM(y) from points;
/* Affected rows: 0  Found rows: 1  Warnings: 0  Duration for 2 queries: 8,580 sec. */

select SUM(x + y) from points;
/* Affected rows: 0  Found rows: 1  Warnings: 0  Duration for 1 query: 8,642 sec. */


In general the timings are of the same range so i suppose the difference is unsignificant.