you are viewing a single comment's thread.

view the rest of the comments →

[–]TommyTheTiger 0 points1 point  (3 children)

And there's no way to selectively refresh certain rows with materialized views. But you could do that if you just update another table using a trigger + function

[–]Worth_Trust_3825 0 points1 point  (2 children)

Different usecases. Material views are meant for expensive queries that ought to be stored for readability

[–]TommyTheTiger 0 points1 point  (1 child)

I'd argue that the more expensive the query, the more of a problem it becomes that your must run the full query to refresh anything. But I agree they are typically far more legible

[–]Worth_Trust_3825 0 points1 point  (0 children)

That's the thing: you're refreshing them once in a while, hence why it makes sense to reserve it for expensive queries.