@@ -123,3 +123,68 @@ pg_database:
123123 - size :
124124 usage : " GAUGE"
125125 description : " Disk space used by the database"
126+
127+
128+ pg_stat_statements :
129+ query : " SELECT query, calls, total_time / 1000 as total_time_seconds, min_time / 1000 as min_time_seconds, max_time / 1000 as max_time_seconds, mean_time / 1000 as mean_time_seconds, stddev_time / 1000 as stddev_time_seconds, 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 / 1000 as blk_read_time_seconds, blk_write_time / 1000 as blk_write_time_seconds FROM pg_stat_statements"
130+ metrics :
131+ - query :
132+ usage : " LABEL"
133+ description : " Query class"
134+ - calls :
135+ usage : " COUNTER"
136+ description : " Number of times executed"
137+ - total_time_seconds :
138+ usage : " COUNTER"
139+ description : " Total time spent in the statement, in milliseconds"
140+ - min_time_seconds :
141+ usage : " GAUGE"
142+ description : " Minimum time spent in the statement, in milliseconds"
143+ - max_time_seconds :
144+ usage : " GAUGE"
145+ description : " Maximum time spent in the statement, in milliseconds"
146+ - mean_time_seconds :
147+ usage : " GAUGE"
148+ description : " Mean time spent in the statement, in milliseconds"
149+ - stddev_time_seconds :
150+ usage : " GAUGE"
151+ description : " Population standard deviation of time spent in the statement, in milliseconds"
152+ - rows :
153+ usage : " COUNTER"
154+ description : " Total number of rows retrieved or affected by the statement"
155+ - shared_blks_hit :
156+ usage : " COUNTER"
157+ description : " Total number of shared block cache hits by the statement"
158+ - shared_blks_read :
159+ usage : " COUNTER"
160+ description : " Total number of shared blocks read by the statement"
161+ - shared_blks_dirtied :
162+ usage : " COUNTER"
163+ description : " Total number of shared blocks dirtied by the statement"
164+ - shared_blks_written :
165+ usage : " COUNTER"
166+ description : " Total number of shared blocks written by the statement"
167+ - local_blks_hit :
168+ usage : " COUNTER"
169+ description : " Total number of local block cache hits by the statement"
170+ - local_blks_read :
171+ usage : " COUNTER"
172+ description : " Total number of local blocks read by the statement"
173+ - local_blks_dirtied :
174+ usage : " COUNTER"
175+ description : " Total number of local blocks dirtied by the statement"
176+ - local_blks_written :
177+ usage : " COUNTER"
178+ description : " Total number of local blocks written by the statement"
179+ - temp_blks_read :
180+ usage : " COUNTER"
181+ description : " Total number of temp blocks read by the statement"
182+ - temp_blks_written :
183+ usage : " COUNTER"
184+ description : " Total number of temp blocks written by the statement"
185+ - blk_read_time_seconds :
186+ usage : " COUNTER"
187+ description : " Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)"
188+ - blk_write_time_seconds :
189+ usage : " COUNTER"
190+ description : " Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)"
0 commit comments