Does the postgresql materialize view rebuild the entire table on a REFRESH command? Is it efficient to TRIGGER a refresh to a materialized view that is dependent on a table with heavy writes?
Asked
Active
Viewed 100 times
1 Answers
0
Yes, REFRESH MATERIALIZED VIEW
will rebuild the whole materialized view.
It would be very inefficient to do that after every data modufication.
What you could do is to use a normal table instead of a materialized view and write a trigger that keeps the table updated.

Laurenz Albe
- 209,280
- 17
- 206
- 263