You often make sums. Why not use separate tables to cache these sums by month, by poste, by whatever ?
Rule on insert on the big table updates the cache tables.