

 Amazon Redshift will no longer support the use of Python UDFs after June 30, 2026. We will start enforcing it in phases. For more information on the details of Python end of life and migration options, see the [ blog post ](https://amazonaws-china.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/) that was published on June 30, 2025. 

# SVV\_MV\_INFO
<a name="r_SVV_MV_INFO"></a>

The SVV\_MV\_INFO table has one row for every materialized view. It contains information about the staleness of the data in the materialized view and the state of the materialized view. 

For more information about materialized views, see [Materialized views in Amazon Redshift](materialized-view-overview.md).

SVV\_MV\_INFO 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](cm_chap_system-tables.md#c_visibility-of-data).

## Table columns
<a name="r_SVV_MV_INFO-table-columns"></a>


| Column name  | Data type  | Description  | 
| --- | --- | --- | 
| database\_name  | char(128)  | The database that contains the materialized view.  | 
| schema\_name | char(128)  | The schema of the database.  | 
| user\_name | char(128)  | The user who owns the materialized view.  | 
| name  | char(128)  | The materialized view name.  | 
| is\_stale  | char(1)  | A t indicates that the materialized view is stale. A stale materialized view is one where the base tables have been updated but the materialized view hasn't been refreshed. An f indicates that the materialized view is up-to-date with the base table changes. A u indicates unknown staleness (for example, in case of MVs on plain external tables). This information might not be accurate if a refresh hasn't been run since the last restart. | 
| state  | integer  | The state of the materialized view as follows: +  0 – The materialized view is fully recomputed when refreshed.  <br />+  1 – The materialized view is incremental. <br />+  101 – The materialized view can't be refreshed due to a dropped column. This constraint applies even if the column isn't used in the materialized view. <br />+  102 – The materialized view can't be refreshed due to a changed column type. This constraint applies even if the column isn't used in the materialized view. <br />+  103 – The materialized view can't be refreshed due to a renamed table. <br />+  104 – The materialized view can't be refreshed due to a renamed column. This constraint applies even if the column isn't used in the materialized view. <br />+  105 – The materialized view can't be refreshed due to a renamed schema.   | 
| autorewrite | char(1) | A t indicates that the materialized view is eligible for automatic rewriting of queries.  | 
| autorefresh | char(1) | Specifies whether Auto Refresh is enabled for the materialized view.  | 
| autorefresh\_interval | int | The Auto Refresh interval, in seconds, configured for the materialized view. Materialized views that don't support user-defined refresh intervals have a value of NULL.  | 
| has\_default\_autorefresh\_interval | char(1) | Specifies whether the materialized view uses the cluster-wide default Auto Refresh interval. Materialized views that don't support user-defined refresh intervals show f.  | 

## Sample query
<a name="r_SVV_MV_INFO-sample-query"></a>

To view the state of all materialized views, run the following query. 

```
select * from svv_mv_info;
```

This query returns the following sample output. 

```
 
 database_name | schema_name | user_name |        name        | is_stale | state | autorewrite | autorefresh | autorefresh_interval | has_default_autorefresh_interval
---------------+-------------+-----------+--------------------+----------+-------+-------------+-------------+----------------------+----------------------------------
 dev           | public      | reg       | customers          | t        |     1 | t           | f           |                      | f
 dev           | public      | reg       | dashboard_partsupp | t        |     1 | t           | t           |                86400 | f
 dev           | public      | reg       | dashboard_sales    | f        |     1 | t           | t           |                  300 | t
```