Skip to content

Commit d40b3d0

Browse files
committed
extra-queries: show example pg_stat_statements user
1 parent 6e3d130 commit d40b3d0

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

queries.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,67 @@ pg_database:
8888
- size:
8989
usage: "GAUGE"
9090
description: "Disk space used by the database"
91+
92+
pg_stat_statements:
93+
query: "SELECT query, calls, total_time, min_time, max_time, mean_time, stddev_time, rows, shared_blks_hit, shared_blks_read, shared_blks_dirtied, shared_blks_written, local_blks_hit, local_blks_read, local_blks_dirtied, local_blks_written, temp_blks_read, temp_blks_written, blk_read_time, blk_write_time FROM pg_stat_statements"
94+
metrics:
95+
- query:
96+
usage: "LABEL"
97+
description: "Query class"
98+
- calls:
99+
usage: "COUNTER"
100+
description: "Number of times executed"
101+
- total_time:
102+
usage: "COUNTER"
103+
description: "Total time spent in the statement, in milliseconds"
104+
- min_time:
105+
usage: "GAUGE"
106+
description: "Minimum time spent in the statement, in milliseconds"
107+
- max_time:
108+
usage: "GAUGE"
109+
description: "Maximum time spent in the statement, in milliseconds"
110+
- mean_time:
111+
usage: "GAUGE"
112+
description: "Mean time spent in the statement, in milliseconds"
113+
- stddev_time:
114+
usage: "GAUGE"
115+
description: "Population standard deviation of time spent in the statement, in milliseconds"
116+
- rows:
117+
usage: "COUNTER"
118+
description: "Total number of rows retrieved or affected by the statement"
119+
- shared_blks_hit:
120+
usage: "COUNTER"
121+
description: "Total number of shared block cache hits by the statement"
122+
- shared_blks_read:
123+
usage: "COUNTER"
124+
description: "Total number of shared blocks read by the statement"
125+
- shared_blks_dirtied:
126+
usage: "COUNTER"
127+
description: "Total number of shared blocks dirtied by the statement"
128+
- shared_blks_written:
129+
usage: "COUNTER"
130+
description: "Total number of shared blocks written by the statement"
131+
- local_blks_hit:
132+
usage: "COUNTER"
133+
description: "Total number of local block cache hits by the statement"
134+
- local_blks_read:
135+
usage: "COUNTER"
136+
description: "Total number of local blocks read by the statement"
137+
- local_blks_dirtied:
138+
usage: "COUNTER"
139+
description: "Total number of local blocks dirtied by the statement"
140+
- local_blks_written:
141+
usage: "COUNTER"
142+
description: "Total number of local blocks written by the statement"
143+
- temp_blks_read:
144+
usage: "COUNTER"
145+
description: "Total number of temp blocks read by the statement"
146+
- temp_blks_written:
147+
usage: "COUNTER"
148+
description: "Total number of temp blocks written by the statement"
149+
- blk_read_time:
150+
usage: "COUNTER"
151+
description: "Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)"
152+
- blk_write_time:
153+
usage: "COUNTER"
154+
description: "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)"

0 commit comments

Comments
 (0)