SELECT * FROM `table` ORDER BY (`column1` - `column2`)
SELECT *, (`column1` - `column2`) AS `column3` FROM `table` ORDER BY `column3`
set profiling=1;
SELECT * FROM `table` ORDER BY (`column1` - `column2`);
SELECT *, (`column1` - `column2`) AS `column3` FROM `table` ORDER BY `column3`;
show profiles;