Updated on 2024-04-30 GMT+08:00

PGXC_WLM_SESSION_STATISTICS

PGXC_WLM_SESSION_STATISTICS displays load management information about jobs that are being executed on CNs.

Table 1 PGXC_WLM_SESSION_STATISTICS columns

Name

Type

Description

datid

oid

OID of the database this backend is connected to

dbname

name

Name of the database the backend is connected to

schemaname

text

Schema name

nodename

text

Name of the CN where the statement is executed

username

name

User name used for connecting to the backend

application_name

text

Name of the application that is connected to the backend

client_addr

inet

IP address of the client connected to this backend. If this column is null, it indicates either that the client is connected via a Unix socket on the server machine or that this is an internal process such as autovacuum.

client_hostname

text

Host name of the connected client, as reported by a reverse DNS lookup of client_addr. This column will only be non-null for IP connections, and only when log_hostname is enabled.

client_port

integer

TCP port number that the client uses for communication with this backend, or -1 if a Unix socket is used

query_band

text

Job type, which is specified by the GUC parameter query_band parameter. The default value is a null string.

pid

bigint

ID of the backend thread

block_time

bigint

Block time before the statement is executed. The unit is ms.

start_time

timestamp with time zone

Time when the statement starts to be executed

duration

bigint

For how long a statement has been executing. The unit is ms.

estimate_total_time

bigint

Estimated execution time of a statement. The unit is ms.

estimate_left_time

bigint

Estimated remaining time of statement execution. The unit is ms.

enqueue

text

Workload management resource status

resource_pool

name

Resource pool used by the user

control_group

text

Cgroup used by the statement

estimate_memory

integer

Estimated memory used by a statement on a single instance. The unit is MB. This column takes effect only when the GUC parameter enable_dynamic_workload is set to on.

min_peak_memory

integer

Minimum memory peak of a statement across all DNs. The unit is MB.

max_peak_memory

integer

Maximum memory peak of a statement across all DNs. The unit is MB.

average_peak_memory

integer

Average memory usage during statement execution. The unit is MB.

memory_skew_percent

integer

Memory usage skew of a statement among DNs.

spill_info

text

Statement spill information on all DNs.

None indicates that the statement has not been spilled to disks on any DNs.

All indicates that the statement has been spilled to disks on every DN.

[a:b] indicates that the statement has been spilled to disks on a of b DNs.

min_spill_size

integer

Minimum spilled data among all DNs when a spill occurs. The unit is MB. The default value is 0.

max_spill_size

integer

Maximum spilled data among all DNs when a spill occurs. The unit is MB. The default value is 0.

average_spill_size

integer

Average spilled data among all DNs when a spill occurs. The unit is MB. The default value is 0.

spill_skew_percent

integer

DN spill skew when a spill occurs

min_dn_time

bigint

Minimum execution time of a statement across all DNs. The unit is ms.

max_dn_time

bigint

Maximum execution time of a statement across all DNs. The unit is ms.

average_dn_time

bigint

Average execution time of a statement across all DNs. The unit is ms.

dntime_skew_percent

integer

Execution time skew of a statement among DNs.

min_cpu_time

bigint

Minimum CPU time of a statement across all DNs. The unit is ms.

max_cpu_time

bigint

Maximum CPU time of a statement across all DNs. The unit is ms.

total_cpu_time

bigint

Total CPU time of a statement across all DNs. The unit is ms.

cpu_skew_percent

integer

CPU time skew of a statement among DNs.

min_peak_iops

integer

Minimum IOPS peak of a statement across all DNs. It is counted by ones in a column-store table and by ten thousands in a row-store table.

max_peak_iops

integer

Maximum IOPS peak of a statement across all DNs. It is counted by ones in a column-store table and by ten thousands in a row-store table.

average_peak_iops

integer

Average IOPS peak of a statement across all DNs. It is counted by ones in a column-store table and by ten thousands in a row-store table.

iops_skew_percent

integer

I/O skew across DNs.

min_read_speed

integer

Minimum I/O read rate of a statement across all DNs within a monitoring period (5s). The unit is KB/s.

max_read_speed

integer

Maximum I/O read rate of a statement across all DNs within a monitoring period (5s). The unit is KB/s.

average_read_speed

integer

Average I/O read rate of a statement across all DNs within a monitoring period (5s). The unit is KB/s.

min_write_speed

integer

Minimum I/O write rate of a statement across all DNs within a monitoring period (5s). The unit is KB/s.

max_write_speed

integer

Maximum I/O write rate of a statement across all DNs within a monitoring period (5s). The unit is KB/s.

average_write_speed

integer

Average I/O write rate of a statement across all DNs within a monitoring period (5s). The unit is KB/s.

recv_pkg

bigint

Total number of communication packages received by a statement across all DNs.

send_pkg

bigint

Total number of communication packages sent by a statement across all DNs.

recv_bytes

bigint

Total received data of the statement stream, in byte.

send_bytes

bigint

Total sent data of the statement stream, in byte.

warning

text

Warning. The following warnings and warnings related to SQL self-diagnosis tuning are displayed:

  1. Spill file size large than 256MB
  2. Broadcast size large than 100MB
  3. Early spill
  4. Spill times is greater than 3
  5. Spill on memory adaptive
  6. Hash table conflict

unique_sql_id

bigint

ID of the normalized unique SQL.

queryid

bigint

Internal query ID used for statement execution

query

text

Statement that is being executed

query_plan

text

Execution plan of a statement

Specification restrictions:

  1. Execution plans are displayed only for DML statements.
  2. In 8.2.1.100 and later versions, the number of data binding times is added to the execution plans of Parse Bind Execute (PBE) statements to facilitate statement analysis. The number of data binding times is displayed in the format of PBE bind times: Times.

node_group

text

Logical cluster of the user running the statement

stmt_type

text

Query type corresponding to the statement.

except_info

text

Information about the exception rule triggered by the statement.

parse_time

bigint

Total parsing time before statements are queued (including lexical syntax parsing, optimization rewriting, and plan generation time). The unit is ms. This field is supported only by 8.3.0.100 and later versions.