What is the order that each step of this query are executed in PostgreSQL?
SELECT SUM(field1)+SUM(field2)+SUM(field3)-SUM(field4);
I gather that the addition/subtraction occurs in the regular order of operations -- in straight left-right order. Do we know what order the different SUMs occur?
This is a subset of a long query (about 40 seconds for execution) and I think that the data in the fields may be changing in real time while the query is being executed.