SYS_ANALYZE_HISTORY - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

SYS_ANALYZE_HISTORY

Logs details for ANALYZE operations.

SYS_ANALYZE_HISTORY is visible only to superusers. For more information, see Visibility of data in system tables and views.

Table columns

Column name Data type Description
user_id integer The ID of the user who generated the entry.
transaction_id long The transaction ID.
query_id long The query identifier in SYS_QUERY_HISTORY.
database_name char(30) The name of the database.
table_name char(30) The name of the table.
table_id integer The ID of the table.
is_automatic char(1) The value is true (t) if the operation included an Amazon Redshift ANALYZE operation by default. The value is false (f) if the ANALYZE command was run explicitly.
status char(15) The result of the analyze command. Possible values are Full, Skipped, and PredicateColumn.
start_time timestamp The time in UTC of when the ANALYZE operation started running.
end_time timestamp The time in UTC of when the ANALYZE operation finished running.
rows double The total number of rows in the table
modified_rows double The total number of rows that were modified since the last ANALYZE operation.
analyze_threshold_percent integer The value of the analyze_threshold_percent parameter.
last_analyze_time timestamp The time in UTC of when the table was previously analyzed.

Sample queries

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