

 Amazon Redshift non supporterà più la creazione di nuovi Python UDFs a partire dalla Patch 198. Python esistente UDFs continuerà a funzionare fino al 30 giugno 2026. Per ulteriori informazioni, consulta il [post del blog](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# SYS\$1MV\$1REFRESH\$1HISTORY
<a name="SYS_MV_REFRESH_HISTORY"></a>

I risultati includono informazioni sulla cronologia degli aggiornamenti di tutte le viste materializzate. I risultati includono il tipo di aggiornamento, ad esempio manuale o automatico, e lo stato dell'aggiornamento più recente. 

SYS\$1MV\$1REFRESH\$1HISTORY è visibile a tutti gli utenti. Gli utenti con privilegi avanzati visualizzano tutte le righe; gli utenti regolari visualizzano solo i propri dati. Per ulteriori informazioni, consultare [Visibilità dei dati nelle tabelle e nelle viste di sistema](cm_chap_system-tables.md#c_visibility-of-data).

## Colonne di tabella
<a name="SYS_MV_REFRESH_HISTORY-table-columns"></a>

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/it_it/redshift/latest/dg/SYS_MV_REFRESH_HISTORY.html)

## Query di esempio
<a name="SYS_MV_REFRESH_HISTORY-sample-queries"></a>

La seguente query mostra la cronologia degli aggiornamenti per le viste materializzate.

```
SELECT user_id, 
     session_id, 
     transaction_id, 
     database_name, 
     schema_name, 
     mv_id, 
     mv_name,
     refresh_type,
     status,
     start_time,
     end_time,
     duration,
     consumer_account,
     consumer_region,
     consumer_namespace
     from sys_mv_refresh_history;
```

Questa query restituisce il seguente output di esempio:

```
 user_id | session_id | transaction_id | database_name | schema_name                | mv_id  |  mv_name           |  refresh_type  |  status                                                                                              |  start_time                |  end_time                  |  duration | consumer_account | consumer_region | consumer_namespace
---------+------------+----------------+---------------+----------------------------+--------+--------------------+----------------+------------------------------------------------------------------------------------------------------+----------------------------+----------------------------+-----------+------------------+-----------------+------------------------------------
       1 | 1073815659 |          15066 | dev           | test_stl_mv_refresh_schema | 203762 | mv_incremental     | Manual         | MV was already updated                                                                               | 2023-10-26 15:59:20.952179 | 2023-10-26 15:59:20.952866 |      687 |                  |                 |
       1 | 1073815659 |          15068 | dev           | test_stl_mv_refresh_schema | 203771 | mv_nonincremental  | Manual         | MV was already updated                                                                               | 2023-10-26 15:59:21.008049 | 2023-10-26 15:59:21.008658 |      609 |                  |                 |
       1 | 1073815659 |          15070 | ext_db        | producer_schema            | 203779 | producer_mv        | Manual         | Refresh successfully updated MV incrementally                                                        | 2023-10-26 15:59:21.064252 | 2023-10-26 15:59:21.064885 |      633 | 0123456789       | us-east-1       | 623d8ff2-4391-4381-83d7-177caa6767af
       1 | 1073815659 |          15074 | dev           | test_stl_mv_refresh_schema | 203762 | mv_incremental     | Manual         | Refresh successfully updated MV incrementally                                                        | 2023-10-26 15:59:29.693329 | 2023-10-26 15:59:43.482842 | 13789513 |                  |                 |
       1 | 1073815659 |          15076 | dev           | test_stl_mv_refresh_schema | 203771 | mv_nonincremental  | Manual         | Refresh successfully recomputed MV from scratch                                                      | 2023-10-26 15:59:43.550184 | 2023-10-26 15:59:47.880833 |  4330649 |                  |                 |
       1 | 1073815659 |          15078 | dev           | test_stl_mv_refresh_schema | 203779 | mv_refresh_error   | Manual         | Refresh failed due to an internal error                                                              | 2023-10-26 15:59:47.949052 | 2023-10-26 15:59:52.494681 |  4545629 |                  |                 |
       1 | 1073815659 |          15071 | dev           | test_stl_mv_refresh_schema | 203778 | mv_test            | Manual         | Cascade refresh failed because materialized view test_stl_mv_refresh_schema.child was not refreshed. | 2023-10-26 15:30:21.432252 | 2023-10-26 15:30:21.432252 |      532 |                  |                 |
       1 | 1073815659 |          15071 | dev           | test_stl_mv_refresh_schema | 203761 | child              | Manual         | Refresh failed due to an internal error.                                                             | 2023-10-26 15:30:21.432252 | 2023-10-26 15:30:21.432252 |      532 |                  |                 |
       1 | 1073815659 |          15069 | dev           | test_stl_mv_refresh_schema | 203778 | mv_test            | Manual         | Cascade refresh skipped because materialized view test_stl_mv_refresh_schema.child was not refreshed.| 2023-10-26 15:21:43.550369 | 2023-10-26 15:21:43.550369 |      633
       1 | 1073815659 |          15069 | dev           | test_stl_mv_refresh_schema | 203761 | child              | Manual         | Refresh failed due to an internal error.                                                             | 2023-10-26 15:21:43.550369 | 2023-10-26 15:21:43.550369 |      633
(10 rows)
```