Postgresql – Optimize aggregate query on massive table to refresh materialized view
Let's say I have the following PostgreSQL database schema: Group id: int Task: id: int created_at: datetime group: FK Group I have the following Materialized View to calculate the number of tasks and the most recent Task.created_at value per group:…