

 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. 

# STV\_MV\_INFO
<a name="r_STV_MV_INFO"></a>

The STV\_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).

STV\_MV\_INFO is visible to all users. Superusers can see all rows; regular users can only list materialized views residing in schemas they have access to. For more information, see [Visibility of data insystem tables and views](https://docs.amazonaws.cn/redshift/latest/dg/cm_chap_system-tables.html#c_visibility-of-data).

 

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


| Column name  | Data type  | Description  | 
| --- | --- | --- | 
| db\_name  | char(128)  | The database that contains the materialized view.  | 
| schema  | char(128)  | The schema of the database.  | 
| name  | char(128)  | The materialized view name.  | 
| updated\_upto\_xid  | bigint  | Reserved for internal use.  | 
| 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). The information might not be accurate if a refresh hasn't been run since the last restart. <br /> The `is_stale` column is always set to `t` if the materialized view depends on a mutable function. A mutable function returns a different result when given the same argument or arguments. For instance, most functions that return a date or timestamp are mutable functions.  | 
| owner\_user\_name  | char(128)  | The user who owns the materialized view.  | 
| 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 -1.  | 
| 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_STV_MV_INFO-sample-query"></a>

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

```
select * from stv_mv_info;
```

This query returns the following sample output. 

```
 db_name | schema |        name        | updated_upto_xid | is_stale | owner_user_name | state | autorefresh | autorewrite | autorefresh_interval | has_default_autorefresh_interval
---------+--------+--------------------+------------------+----------+-----------------+-------+-------------+-------------+----------------------+----------------------------------
 dev     | public | customers          |             3058 | t        | reg             |     1 | f           | t           |                   -1 | f
 dev     | public | dashboard_partsupp |             3083 | t        | reg             |     1 | t           | t           |                86400 | f
 dev     | public | dashboard_sales    |             3362 | f        | reg             |     1 | t           | t           |                  300 | t
```