SVV_MV_DEPENDENCY - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


The SVV_MV_DEPENDENCY table shows the dependencies of materialized views on other materialized views within Amazon Redshift.

For more information about materialized views, see Creating materialized views in Amazon Redshift.

SVV_MV_DEPENDENCY is visible to all users. Superusers can see all rows; regular users can see only their own data. For more information, see Visibility of data in system tables and views.

Table columns

Column name Data type Description
database_name char(128) The database that contains the specified materialized view.
schema_name char(128) The schema of the materialized view.
name char(128) The name of the materialized view.
dependent_database_name char(128) The materialized view database on which this materialized view depends.
dependent_schema_name char(128) The materialized view schema on which this materialized view depends.
dependent_name char(128) The name of the materialized view on which this materialized view depends.

Sample query

The following query returns an output row that indicates that the materialized view mv_over_foo uses the materialized view mv_foo in its definition as a dependency.

CREATE SCHEMA test_ivm_setup; CREATE TABLE INT); CREATE MATERIALIZED VIEW test_ivm_setup.mv_foo AS SELECT * FROM; CREATE MATERIALIZED VIEW test_ivm_setup.mv_over_foo AS SELECT * FROM test_ivm_setup.mv_foo; SELECT * FROM svv_mv_dependency; database_name | schema_name | name | dependent_database_name | dependent_schema_name | dependent_name ---------------+----------------------+-------------+-------------------------+---------------------------+---------- dev | test_ivm_setup | mv_over_foo | dev | test_ivm_setup | mv_foo