Skip to content

non-concurrent-refresh-materialized-view (US028)#

Automatic fix is available.

What it does#

Checks non-concurrent refresh materialized view.

Why not?#

Refreshing a materialized view in non-concurrent mode will locks out reads on the materialized view until it is done. This will cause downtime if the materialized view is concurrently being read by other clients.

When should you?#

If downtime is acceptable.

Use instead:#

Refresh the materialized view in concurrent mode: REFRESH MATERIALIZED VIEW CONCURRENTLY ..

Please note that CONCURRENTLY option is only allowed if there is at least one UNIQUE index on the materialized view which uses only column names and includes all rows; that is, it must not be an expression index or include a WHERE clause.