STATEMENT_HISTORY
STATEMENT_HISTORY displays information about execution statements on the current node. To query system catalogs, you must have the **sysadmin **permission.
Table 1 STATEMENT_HISTORY columns
Number of soft parsing times. The value of n_soft_parse plus the value of n_hard_parse may be greater than the value of n_calls because the number of subqueries is not counted in the value of n_calls. | ||
Number of hard parsing times. The value of n_soft_parse plus the value of n_hard_parse may be greater than the value of n_calls because the number of subqueries is not counted in the value of n_calls. | ||
Number of rows in the result set returned by the SELECT statement. | ||
Valid DB time, which is accumulated if multiple threads are involved (unit: μs). | ||
Network status of messages sent through a physical connection, including the time (unit: μs), number of calls, and throughput (unit: byte). This can be used to analyze the network overhead of SQL statements in a distributed system and is not supported in standalone system. Example: {"time":xxx, "n_calls":xxx, "size":xxx}. | ||
Network status of messages received through a physical connection, including the time (unit: μs), number of calls, and throughput (unit: byte). This field can be used to analyze the network overhead of SQL in a distributed system. This field is not supported in a standalone mode. Example: {"time":xxx, "n_calls":xxx, "size":xxx}. | ||
Network status of messages sent through a logical connection, including the time (unit: μs), number of calls, and throughput (unit: byte). This field can be used to analyze the network overhead of SQL in a distributed system. This field is not supported in a standalone mode. Example: {"time":xxx, "n_calls":xxx, "size":xxx}. | ||
Network status of messages received through a logical connection, including the time (unit: μs), number of calls, and throughput (unit: byte). This field can be used to analyze the network overhead of SQL in a distributed system. This field is not supported in a standalone mode. Example: {"time":xxx, "n_calls":xxx, "size":xxx}. | ||
List of wait events and statement lock events. List of wait events, which displays statistics about the wait events of the current statement. For details about events, see Table 2, Table 3, Table 4, and Table 5. For details about the impact of each transaction lock on services, see LOCK. List of statement lock events, which are recorded in time sequence. The number of records is affected by the track_stmt_details_size parameter. This field is in binary format and needs to be read by using the parsing function pg_catalog.statement_detail_decode. For details, see Table 5.
| ||