History views and tables

A history database provides views that users can use to access a subset of the history data. These views have names of the form $v_hist_* (for query history data) or $v_sig_hist_* (for audit history data). Users can access the remaining history data directly in the history tables. These tables have names of the form $hist_*.

Restriction: Do not change, drop, or modify these views or tables, because doing so can cause history-data collection to stop working.
Description View or table View for audit history data
The names of all columns, collected during table access. $v_hist_column_access_stats  
Queries that were not captured completely. $v_hist_incomplete_queries  
Information about events that occurred. $v_hist_log_events  
Information about completed queries. $v_hist_queries  
The same information as in $v_hist_queries, but only for successful queries. $v_hist_successful_queries  
The names of all the tables that are captured in table access $v_hist_table_access_stats  
The same information as in $v_hist_queries, but only for unsuccessful queries. $v_hist_unsuccessful_queries  
The column access history for a query. $hist_column_access_n $v_sig_hist_column_access_n
The failed authentication attempts for every authenticated operation. $hist_failed_authentication_n $v_sig_hist_failed_authentication_n
The log entries for all history operations. $hist_log_entry_n $v_sig_hist_log_entry_n
The systems that story history data in the history database. $hist_nps_n  
Plan history information collected at the end of the plan execution. $hist_plan_epilog_n $v_sig_hist_plan_epilog_n
Plan history information collected at the beginning of plan execution. $hist_plan_prolog_n $v_sig_hist_plan_prolog_n
Data collected at the end of the query. $hist_query_epilog_n $v_sig_hist_query_epilog_n
The remaining characters of the query string that was stored in the querytext column of the $hist_query_prolog_n table. $hist_query_overflow_n $v_sig_hist_query_overflow_n
Initial data collected at the start of a query. $hist_query_prolog_n $v_sig_hist_query_prolog_n
Information about CLI usage from the localhost or remote client. $hist_service_n $v_sig_hist_service_n
Information about each session, collected during session termination. $hist_session_epilog_n $v_sig_hist_session_epilog_n
Information about each created session. $hist_session_prolog_n $v_sig_hist_session_prolog_n
The state changes in the system. $hist_state_change_n $v_sig_hist_state_change_n
The table access history for a query. $hist_table_access_n $v_sig_hist_table_access_n
The version number and type of the history database. $hist_version  
Note:
  • Views have names that begin with $v; tables have names that begin with $hist.
  • The variable n represents the version number of the database.

The audit history views use row-level security to restrict access to the audit information. Each has a name of the form $v_sig_hist_*. Each has the same columns as its corresponding $hist_* table, but also has an additional security label (sec_label) column that contains the security descriptor string.

The views _v_qryhist, _v_qrystat, _v_querystatus, and _v_planstatus were provided in early Netezza Performance Server releases but are now deprecated. They are provided for compatibility, but whenever possible, use the other history data views and tables instead.

Remember: The history user table names use delimited (quoted) identifiers. When you query these tables, you must enclose the table name in double quotation marks. For example:
MYDB.SCHEMA(USER)=> select * from "$hist_version";