Updated on 2024-08-20 GMT+08:00

Support and Constraints

Supported Scenarios

  • Supports statements for querying a single table.
  • Supports UNION ALL for querying multiple single tables.
  • Creates an index in a materialized view.
  • Performs the ANALYZE operation in a materialized view.
  • Creates a fast-refresh materialized view based on the node group of base tables. (Check whether the base tables are in the same node group and create the fast-refresh materialized view based on the node group).

Unsupported Scenarios

  • Materialized views do not support the Stream plan, multi-table join plan, or subquery plan.
  • Except for a few ALTER operations, most DDL operations cannot be performed on base tables in materialized views.
  • A distribution key of a materialized view cannot be specified when the materialized view is created.
  • Materialized views cannot be added, deleted, or modified. Only query statements are supported.
  • Materialized views cannot be created using a temporary, hash bucket, unlogged, or partitioned table. Only the hash distributed table is supported.
  • Materialized views cannot be created in nested mode (that is, a materialized view cannot be created in another materialized view).
  • Materialized views of the UNLOGGED type are not supported, and the WITH syntax is not supported.
  • Ustore does not support the creation and use of fast-refresh materialized views.

Constraints

  • If the materialized view is defined as UNION ALL, each subquery must use a different base table and the distribution key of each base table must be the same. The distribution key of the materialized view is automatically deduced and is the same as that of each base table.
  • The columns defined in the materialized view must contain all distribution keys in the base table.
  • When an incremental materialized view is created, fully refreshed, or deleted, a high-level lock is added to the base table. If the materialized view is defined as UNION ALL, pay attention to the service logic to avoid deadlock.