aligputf8=# explain analyze select sum(col1),sum(col2),sum(col3),sum(col4),sum(col5),sum(col6),sum(col7),sum(col8),sum(col9) from test_group group by col5; QUERY PLAN ---------------------------------------------------------------------------------------------------- HashAggregate (cost=4186.96..5432.88 rows=38336 width=62) Group By: col5 Rows out: 6401 rows with 289 ms to first row, 295 ms to end, start offset by 0.143 ms. Executor memory: 2818K bytes. -> Seq Scan on test_group (cost=0.00..1480.56 rows=108256 width=62) Rows out: 100000 rows with 0.023 ms to first row, 48 ms to end, start offset by 0.218 ms. Slice statistics: (slice0) Executor memory: 2996K bytes. Settings: enable_seqscan=off Total runtime: 296.283 ms (10 rows)