Isn't this what is done by some SQL engines with materialized views?

They update view data (counts and group by and sums) as the source table data changes. But not by rerunning the view, but smartly updating its contents based on the change that happened.

There are tons of limits in these views, as they have to provide stable results.

See ms sql documentation on limits of streamed/indexes sql views https://learn.microsoft.com/en-us/sql/relational-databases/v...

Some recent solutions to this problem include Differential Dataflow and Materialize. It would be neat if postgres adopted something similar for live-updating materialized views.

https://github.com/timelydataflow/differential-dataflow

https://materialize.com/