Amazon Redshift 自 2025 年 11 月 1 日起不再支援建立新的 Python UDF。如果您想要使用 Python UDF,請在該日期之前建立 UDF。現有 Python UDF 將繼續正常運作。如需詳細資訊,請參閱部落格文章
SYS_ANALYZE_HISTORY
記錄 ANALYZE 操作的詳細資訊。
只有超級使用者才能看到 SYS_ANALYZE_HISTORY。如需更多詳細資訊,請參閱 系統資料表和檢視中資料的可見性。
資料表欄
| 欄名稱 | 資料類型 | 說明 |
|---|---|---|
| user_id | integer | 產生項目的使用者之 ID。 |
| transaction_id | long | 交易的 ID。 |
| database_name | char(30) | 資料庫的名稱。 |
| table_name | char(30) | 資料表的名稱。 |
| table_id | integer | 資料表的 ID。 |
| is_automatic | char(1) | 如果操作預設包含 Amazon Redshift ANALYZE 操作,則值為 true (t)。如果明確執行 ANALYZE 命令,則值為 false (f)。 |
| status | char(15) | 分析命令的結果。可能的值包括 Full、Skipped 和 PredicateColumn。 |
| start_time | timestamp | ANALYZE 操作開始執行的時間,以 UTC 表示。 |
| end_time | timestamp | ANALYZE 操作完成執行的時間,以 UTC 表示。 |
| rows | double | 資料表中的列總數 |
| modified_rows | double | 自前次 ANALYZE 操作後已修改的資料列總數。 |
| analyze_threshold_percent | integer | analyze_threshold_percent 參數的值。 |
| last_analyze_time | timestamp | 先前分析資料表的時間,以 UTC 表示。 |
範例查詢
user_id | transaction_id | database_name | schema_name | table_name | table_id | is_automatic | Status | start_time | end_time | rows | modified_rows | analyze_threshold_percent | last_analyze_time ---------+----------------+---------------+-------------+---------------------+----------+--------------+--------+----------------------------+----------+-----------------+------+---------------+---------------------------+--------------------- 101 | 8006 | dev | public | test_table_562bf8dc | 110427 | f | Full | 2023-09-21 18:33:08.504646 | 2023-09-21 18:33:24.296498 | 5 | 5 | 0 | 2000-01-01 00:00:00