STATEMENT_HISTORY
STATEMENT_HISTORY displays information about execution statements on the current node. To query this system catalog, you must have the sysadmin or monitor admin permission. The result can be queried only in the system database but cannot be queried in the user database.
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 column can be used to analyze the network overhead of SQL in a distributed system. This column 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 column can be used to analyze the network overhead of SQL in a distributed system. This column 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 column can be used to analyze the network overhead of SQL in a distributed system. This column is not supported in a standalone mode. Example: {"time":xxx, "n_calls":xxx, "size":xxx}. | |||
List of wait events and statement lock events. When the value of the record level is L0, the wait events starts to be recorded to the list. Statistics about the wait event of the current statement are displayed. For details about events, see Waiting status list, List of wait events corresponding to lightweight locks, List of wait events corresponding to I/Os, and List of wait events corresponding to transaction locks. For details about the impact of each transaction lock on services, see LOCK. When the record level is L2, the statement lock events starts to be recorded to the list. The events are recorded in time sequence. The number of records is affected by the track\_stmt\_details\_size parameter. This column is in binary format and needs to be read by using the parsing function pg\_catalog.statement\_detail\_decode. For details, see Table 6.
| |||
Whether the SQL statement is a slow SQL statement. | |||
Driver-specific trace ID, which is associated with an application request. |