HomeMogDBMogDB StackUqbar
v2.1

Documentation:v2.1

Supported Versions:

Other Versions:

REFRESH INCREMENTAL MATERIALIZED VIEW

Function

REFRESH INCREMENTAL MATERIALIZED VIEW refreshes the materialized view in materialized mode.

Precautions

  • Incremental refresh supports only incremental materialized views.
  • To refresh a materialized view, you must have the SELECT permission on the base table.

Syntax

RefreshIncrementalMaterializedView ::= REFRESH INCREMENTAL MATERIALIZED VIEW mv_name;

Parameter Description

  • mv_name

    Name of the materialized view to be refreshed.

Example

-- Create an ordinary table.
mogdb=# CREATE TABLE my_table (c1 int, c2 int);
-- Create an incremental materialized view.
mogdb=# CREATE INCREMENTAL MATERIALIZED VIEW my_imv AS SELECT * FROM my_table;
-- Write data to the base table.
mogdb=# INSERT INTO my_table VALUES(1,1),(2,2);
-- Incrementally refresh the incremental materialized view my_imv.
mogdb=# REFRESH INCREMENTAL MATERIALIZED VIEW my_imv;

ALTER MATERIALIZED VIEW, CREATE INCREMENTAL MATERIALIZED VIEW, CREATE MATERIALIZED VIEW, CREATE TABLE, DROP MATERIALIZED VIEW, and REFRESH MATERIALIZED VIEW

Copyright © 2011-2024 www.enmotech.com All rights reserved.