SYS_ANALYZE_HISTORY - Amazon Redshift
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

SYS_ANALYZE_HISTORY

记录 ANALYZE 操作的详细信息。

SYS_ANALYZE_HISTORY 只对超级用户可见。有关更多信息,请参阅 系统表和视图中的数据可见性

表列

列名称 数据类型 描述
user_id 整数 生成该条目的用户的 ID。
transaction_id long 事务 ID。
query_id long SYS_QUERY_HISTORY 中的查询标识符。
database_name char(30) 数据库的名称。
table_name char(30) 表的名称。
table_id 整数 表的 ID。
is_automatic char(1) 如果操作默认情况下包含 Amazon Redshift ANALYZE 操作,则值为 true (t)。如果显式运行了 ANALYZE 命令,则值为 false (f)。
status char(15) 分析命令的结果。可能的值为 Full、Skipped 和 PredicateColumn。
start_time 时间戳 ANALYZE 操作开始运行的时间(采用 UTC 表示)。
end_time 时间戳 ANALYZE 操作完成运行的时间(采用 UTC 表示)。
rows double 表中的总行数
modified_rows double 自上次执行 ANALYZE 操作以来修改的行的总数。
analyze_threshold_percent 整数 analyze_threshold_percent 参数的值。
last_analyze_time 时间戳 上次分析表的时间(采用 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