REFRESH MATERIALIZED VIEW

    注意事项

    • 刷新物化视图需要当前用户拥有基表的SELECT权限。

    参数说明

    1. openGauss=# CREATE TABLE my_table (c1 int, c2 int);
    2. --创建全量物化视图
    3. openGauss=# CREATE MATERIALIZED VIEW my_mv AS SELECT * FROM my_table;
    4. openGauss=# CREATE INCREMENTAL MATERIALIZED VIEW my_imv AS SELECT * FROM my_table;
    5. --基表写入数据
    6. openGauss=# INSERT INTO my_table VALUES(1,1),(2,2);
    7. openGauss=# REFRESH MATERIALIZED VIEW my_mv;
    8. --对增量物化视图my_imv进行全量刷新

    相关链接