Updated on 2025-05-29 GMT+08:00

STATEMENT_RESPONSETIME_PERCENTILE

Obtains the response times of 80% and 95% SQL statements in the database, as described in Table 1.

Table 1 STATEMENT_RESPONSETIME_PERCENTILE columns

Name

Type

Description

p80

bigint

Response time of 80% SQL statements in the database (unit: μs).

p95

bigint

Response time of 95% SQL statements in the database (unit: μs).

dbid

oid

OID of the current database. If the OID is queried in the PDB, the value is the ID of the current PDB. Otherwise, the value of dbid is 0, indicating that the query result is the response time of 80% and 95% SQL statements of the current node.

Example:

-- You can query the SQL response time distribution of the current node in the CDB. In this case, the corresponding dbid is 0.
gaussdb=# select * from dbe_perf.STATEMENT_RESPONSETIME_PERCENTILE;
 p80  | p95  | dbid
------+------+------
 2803 | 6518 |    0
(1 row)

-- Query the SQL response time distribution of the current PDB in the PDB. In this case, the corresponding dbid is the dbid of the current PDB.
gaussdb=# \c pdb1
pdb1=# select * from dbe_perf.STATEMENT_RESPONSETIME_PERCENTILE;
 p80  | p95  |    dbid
------+------+------------
 6211 | 7348 | 1255163054
(1 row)