Postgres materialized views or CREATE TABLE AS if not updating incrementally?

366 Views Asked by At

If I don't plan to implement incremental updates for materialized views in Postgres, are there any advantages to using them over CREATE TABLE AS? From what I have read, when you refresh a materialized view, that view locks and is not readable. Since it's unavailable, it seems to have the same affect as dropping and recreating a table at the same rate you run refresh on a materialized view.

1

There are 1 best solutions below

0
On

As of PostgreSQL 9.3.2 you also cannot use materialized view data as basis of UPDATE query. So if you need to use this view as a basis of some updates then you are better of using regular tables.