Postgres index for aggregate functions
You have two easy options


You can use a MATERIALIZED VIEW
You can also use a TRIGGER that inserts another table.


Both of these will allow you to cache the SUM(). I would go with the MATERIALIZED VIEW unless you need up to date changes all the time.

Before you go down that route though PostgreSQL 9.6 enables parallel seq scans and aggregation which will increase performance. In fact, it's an ideal use case. If you just need this to be faster try setting max_parallel_workers_per_gather