Amazon Redshift will no longer support the creation of new Python UDFs starting November 1, 2025.
If you would like to use Python UDFs, create the UDFs prior to that date.
Existing Python UDFs will continue to function as normal. For more information, see the
blog post
STV_MV_INFO
The STV_MV_INFO table contains a row for every materialized view, whether the data is stale, and state information.
For more information about materialized views, see Materialized views in Amazon Redshift.
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.
Table columns
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
The |
owner_user_name | char(128) | The user who owns the materialized view. |
state | integer | The state of the materialized view as follows:
|
autorewrite | char(1) | A t indicates that the materialized
view is eligible for automatic rewriting of queries. |
autorefresh | char(1) | A t indicates that the materialized
view can be automatically refreshed. |
Sample query
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 ---------+--------------------+---------+------------------+----------+-----------------+-------+-------------+------------ dev | test_ivm_setup | mv | 1031 | f | catch-22 | 1 | 1 | 0 dev | test_ivm_setup | old_mv | 988 | t | lotr | 1 | 0 | 1