Help Center/ GaussDB/ Developer Guide(Centralized_V2.0-2.x)/ SQL Reference/ SQL Syntax/ REFRESH INCREMENTAL MATERIALIZED VIEW
Updated on 2025-08-19 GMT+08:00
REFRESH INCREMENTAL MATERIALIZED VIEW
Function
REFRESH INCREMENTAL MATERIALIZED VIEW refreshes a materialized view in incremental mode.
Precautions
- Incremental refresh supports only fast-refresh materialized views.
- To refresh a materialized view, you must have the SELECT permission on the base table.
Syntax
REFRESH INCREMENTAL MATERIALIZED VIEW mv_name;
Parameter Description
- mv_name
Name of the materialized view to be refreshed.
Examples
-- Create an ordinary table. openGauss=# CREATE TABLE my_table (c1 int, c2 int); -- Create a fast-refresh materialized view. openGauss=# CREATE INCREMENTAL MATERIALIZED VIEW my_imv AS SELECT * FROM my_table; -- Write data to the base table. openGauss=# INSERT INTO my_table VALUES(1,1),(2,2); -- Fast refresh the fast-refresh materialized view my_imv. openGauss=# REFRESH INCREMENTAL MATERIALIZED VIEW my_imv; -- Delete the fast-refresh materialized view. openGauss=# DROP MATERIALIZED VIEW my_imv; -- Delete the my_table table. openGauss=# DROP TABLE my_table;
Parent topic: SQL Syntax
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.