sqlamazon-redshiftmaterialized-views

How can I tell if a materialized view refresh will be full refresh or incremental refresh?


According to the Redshift docs on materialized view refreshes, there are many rules specified for the kinds of query logic that disallow incremental refreshes of materialized views. However, while working with a materialized view, I can find no way to empirically confirm whether or not a potential refresh will be full or incremental using something like explain. Is there any way to test for refresh types on MVs within Redshift?


Solution

  • The state column in the STV_MV_INFO table will tell you if an existing mv can be incrementally updated or has to be recomputed in full.

    Source: https://docs.aws.amazon.com/redshift/latest/dg/r_STV_MV_INFO.html