select a, sum(b) from table1 group by a;
has to scan the whole table, so order shouldn't matter. Please show us the explain analyze
for your queries, that will provide information about how PostgreSQL is executing your queries.
select a, sum(b) from table1 group by a;
has to scan the whole table, so order shouldn't matter. Please show us the explain analyze
for your queries, that will provide information about how PostgreSQL is executing your queries.