---
name: "SHOW_POOL_BACKEND_STATS"
section: "1"
platform: "linux"
package: "pgpool2"
version: "4.6.1-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SHOW_POOL_BACKEND_STATS"
---

# SHOW\_POOL\_BACKEND\_STATS(1)

show backend SQL command statistics

## NAME

SHOW\_POOL\_BACKEND\_STATS - show backend SQL command statistics

## SYNOPSIS

```
   SHOW POOL_BACKEND_STATS
```

## DESCRIPTION

**SHOW POOL\_BACKEND\_STATS** displays the node id, the hostname, the port, the status, the role, the SELECT/INSERT/UPDATE/DELETE/DDL/other query counts issued to each backend. Also error messages returned from backend are counted and shown, classified by the severity. The node id, the hostname, the port, the status, the role are same as SHOW POOL\_NODES ([**SHOW\_POOL\_NODES**(1)](/SHOW_POOL_NODES/1.md)).

select\_cnt, insert\_cnt, update\_cnt, delete\_cnt, ddl\_cnt, other\_cnt are the numbers of SQL command: SELECT, INSERT, UPDATE, DELETE, DDL and others issued since Pgpool-II started. Failed commands (for example SELECT from non-existing table) are counted. Commands rolled back are also counted. Currently, other than SELECT/WITH/INSERT/UPDATE/DELETE/CHECKPOINT/DEALLOCATE/DISCARD/EXECUTE/ EXPLAIN/LISTEN/LOAD/LOCK/NOTIFY/PREPARE/SET/SHOW/Transaction commands/UNLISTEN are considered as DDL.

Here is an example session:

```
test=# show pool_backend_stats;
 node_id | hostname | port  | status |  role   | select_cnt | insert_cnt | update_cnt | delete_cnt | ddl_cnt | other_cnt | panic_cnt | fatal_cnt | error_cnt
---------+----------+-------+--------+---------+------------+------------+------------+------------+---------+-----------+-----------+-----------+-----------
 0       | /tmp     | 11002 | up     | primary | 12         | 10         | 30         | 0          | 2       | 30        | 0         | 0         | 1
 1       | /tmp     | 11003 | up     | standby | 12         | 0          | 0          | 0          | 0       | 23        | 0         | 0         | 1
(2 rows)
```
