Updated on 2026-11-12 GMT+08:00

PV_MATVIEW_DETAIL

PV_MATVIEW_DETAIL displays detailed information about a materialized view. This view is supported only by clusters of version 9.1.0 200 or later.

Table 1 PV_MATVIEW_DETAIL columns

Column

Type

Description

matview

Text

Materialized view name

baserel

Text

Base table name

partids

oidvector

OID of a specified partition.

contain_entire_rel

Boolean

Whether to create a materialized view based on the entire base table

build_mode

Text

Build mode of the materialized view.

  • 'd': indicates "deferred", which means that data is contained in the materialized view only when the view is refreshed for the first time.
  • 'i': indicates "immediate", which means that the latest data is included when the materialized view is created.

refresh_mode

Text

Refresh mode of the materialized view.

'd': stands for demand, indicating on-demand update.

refresh_method

Text

Refresh method of the materialized view.

'c' indicates a full refresh.

mapping

Text

Mapping between base table partitions and materialized view partitions

active

Boolean

Data status of the materialized view

  • t: The data in the materialized view is consistent with that in the base table and can be used for query rewriting.
  • f: The data in the base table has changed but the materialized view has not been refreshed. The data is outdated and cannot be used for query rewriting. It needs to be refreshed to restore the data.

last_refresh_start

Timestamp with time zone

Start time of the last refresh

last_refresh_end

Timestamp with time zone

End time of the last refresh