Updated on 2024-06-03 GMT+08:00

ADM_HIST_SQLSTAT

ADM_HIST_SQLSTAT displays information about statements executed on the current node. By default, only the system administrator can access this view. Common users can access the view only after being authorized. This view exists in the PG_CATALOG and SYS schemas.

After the WDR snapshot function is enabled (that is, the GUC parameter enable_wdr_snapshot is set to on), users can view the data in this view.

Table 1 ADM_HIST_SQLSTAT columns

Name

Type

Description

instance_number

integer

Instance ID of a snapshot.

plan_hash_value

integer

ID of the normalized SQL statement.

module

integer

Name of the module that is executing when the SQL statement is first parsed.

apwait_delta

integer

Delta value of the application wait time.

sql_id

bigint

Query ID.

snap_id

bigint

Unique snapshot ID.

elapsed_time_delta

bigint

Valid DB time, which is accumulated if multiple threads are involved (unit: μs).

cpu_time_delta

bigint

CPU time (unit: μs).

executions_delta

bigint

Increment in the number of executions that have occurred on this object since it was brought into the cache.

iowait_delta

bigint

I/O time (unit: μs).

rows_processed_delta

bigint

Number of rows in the result set returned by the SELECT statement.

parsing_schema_name

character varying

Not supported. Its value is NULL.

disk_reads_delta

bigint

Not supported. Its value is NULL.

buffer_reads_delta

bigint

Not supported. Its value is NULL.

clwait_delta

bigint

Not supported. Its value is NULL.