REFRESH MATERIALIZED VIEW
注意事项
- 刷新物化视图需要当前用户拥有基表的SELECT权限。
参数说明
openGauss=# CREATE TABLE my_table (c1 int, c2 int);
--创建全量物化视图
openGauss=# CREATE MATERIALIZED VIEW my_mv AS SELECT * FROM my_table;
openGauss=# CREATE INCREMENTAL MATERIALIZED VIEW my_imv AS SELECT * FROM my_table;
--基表写入数据
openGauss=# INSERT INTO my_table VALUES(1,1),(2,2);
openGauss=# REFRESH MATERIALIZED VIEW my_mv;
--对增量物化视图my_imv进行全量刷新