Advanced: Viewing materialized view information in the catalog

You can view a list of all materialized views and their status, and also review the database options that were in force when each materialized view was created.

Prerequisites

The materialized views cannot be hidden.

Context and remarks

Dependency information can also be found in the SYSDEPENDENCY system view.

 Viewing materialized view information in the database using SQL
  1. Connect to the database.

  2. To view a list of all materialized views and their status, execute the following statement:

    SELECT * FROM sa_materialized_view_info();
  3. To review the database options in force for each materialized view when it was created, execute the following statement:

    SELECT b.object_id, b.table_name, a.option_id, c.option_name, a.option_value
    FROM SYSMVOPTION a, SYSTAB b, SYSMVOPTIONNAME c
    WHERE a.view_object_id=b.object_id
    AND b.table_type=2;
  4. To request a list of regular views that are dependent on a given materialized view, execute the following statement:

    CALL sa_dependent_views( 'materialized-view-name' );

Results

The requested materialized view information is returned.

Next

None.

 See also