Skip to content

Commit 6a76444

Browse files
1. StatIO for indexes
2. Switch to pg_class from pgwatch_pg_btree_bloat_real_size_mib 3. Change to sentence case in dash2 table 4. all_ instead of user_ for tables/indexes 5. fixed a bug of not filtering top_k for aggregated table stats 6. Added statement timeouts to all metrics
1 parent b958fa0 commit 6a76444

File tree

5 files changed

+372
-344
lines changed

5 files changed

+372
-344
lines changed

config/grafana/dashboards/Dashboard_10_Index health.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,9 +593,9 @@
593593
"targets": [
594594
{
595595
"editorMode": "code",
596-
"expr": "topk($top_n, pgwatch_pg_btree_bloat_real_size_mib{cluster='$cluster_name', node_name='$node_name', datname=\"$db_name\"})*1024*1024",
596+
"expr": "topk($top_n, pgwatch_pg_class_relation_size_bytes{relkind=\"105\", cluster='$cluster_name', node_name='$node_name', datname=\"$db_name\"})",
597597
"interval": "20",
598-
"legendFormat": "{{schemaname}}.{{tblname}}.{{idxname}}",
598+
"legendFormat": "{{schemaname}}.{{relname}}",
599599
"range": true,
600600
"refId": "A"
601601
}

config/grafana/dashboards/Dashboard_2_Aggregated_query_analysis.json

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -217,32 +217,32 @@
217217
},
218218
{
219219
"selector": "exec_time",
220-
"text": "Exec Time (ms)",
220+
"text": "Exec time (ms)",
221221
"type": "number"
222222
},
223223
{
224224
"selector": "exec_time_per_sec",
225-
"text": "Exec Time/sec (ms/s)",
225+
"text": "Exec time/sec (ms/s)",
226226
"type": "number"
227227
},
228228
{
229229
"selector": "exec_time_per_call",
230-
"text": "Exec Time/call (ms)",
230+
"text": "Exec time/call (ms)",
231231
"type": "number"
232232
},
233233
{
234234
"selector": "plan_time",
235-
"text": "Planning Time (ms)",
235+
"text": "Planning time (ms)",
236236
"type": "number"
237237
},
238238
{
239239
"selector": "plan_time_per_sec",
240-
"text": "Planning Time/sec (ms/s)",
240+
"text": "Planning time/sec (ms/s)",
241241
"type": "number"
242242
},
243243
{
244244
"selector": "plan_time_per_call",
245-
"text": "Planning Time/call (ms)",
245+
"text": "Planning time/call (ms)",
246246
"type": "number"
247247
},
248248
{
@@ -262,92 +262,92 @@
262262
},
263263
{
264264
"selector": "shared_blks_hit",
265-
"text": "Shared Blocks Hit",
265+
"text": "Shared blocks hit",
266266
"type": "number"
267267
},
268268
{
269269
"selector": "shared_blks_hit_per_sec",
270-
"text": "Shared Blocks Hit/sec",
270+
"text": "Shared blocks hit/sec",
271271
"type": "number"
272272
},
273273
{
274274
"selector": "shared_blks_hit_per_call",
275-
"text": "Shared Blocks Hit/call",
275+
"text": "Shared blocks hit/call",
276276
"type": "number"
277277
},
278278
{
279279
"selector": "shared_blks_read",
280-
"text": "Shared Blocks Read",
280+
"text": "Shared blocks read",
281281
"type": "number"
282282
},
283283
{
284284
"selector": "shared_blks_read_per_sec",
285-
"text": "Shared Blocks Read/sec",
285+
"text": "Shared blocks read/sec",
286286
"type": "number"
287287
},
288288
{
289289
"selector": "shared_blks_read_per_call",
290-
"text": "Shared Blocks Read/call",
290+
"text": "Shared blocks read/call",
291291
"type": "number"
292292
},
293293
{
294294
"selector": "shared_blks_dirtied",
295-
"text": "Shared Blocks Dirtied",
295+
"text": "Shared blocks dirtied",
296296
"type": "number"
297297
},
298298
{
299299
"selector": "shared_blks_dirtied_per_sec",
300-
"text": "Shared Blocks Dirtied/sec",
300+
"text": "Shared blocks dirtied/sec",
301301
"type": "number"
302302
},
303303
{
304304
"selector": "shared_blks_dirtied_per_call",
305-
"text": "Shared Blocks Dirtied/call",
305+
"text": "Shared blocks dirtied/call",
306306
"type": "number"
307307
},
308308
{
309309
"selector": "shared_blks_written",
310-
"text": "Shared Blocks Written",
310+
"text": "Shared blocks written",
311311
"type": "number"
312312
},
313313
{
314314
"selector": "shared_blks_written_per_sec",
315-
"text": "Shared Blocks Written/sec",
315+
"text": "Shared blocks written/sec",
316316
"type": "number"
317317
},
318318
{
319319
"selector": "shared_blks_written_per_call",
320-
"text": "Shared Blocks Written/call",
320+
"text": "Shared blocks written/call",
321321
"type": "number"
322322
},
323323
{
324324
"selector": "blk_read_time",
325-
"text": "Block Read Time (ms)",
325+
"text": "Block read time (ms)",
326326
"type": "number"
327327
},
328328
{
329329
"selector": "blk_read_time_per_sec",
330-
"text": "Block Read Time/sec (ms)",
330+
"text": "Block read time/sec (ms)",
331331
"type": "number"
332332
},
333333
{
334334
"selector": "blk_read_time_per_call",
335-
"text": "Block Read Time/call (ms)",
335+
"text": "Block read time/call (ms)",
336336
"type": "number"
337337
},
338338
{
339339
"selector": "blk_write_time",
340-
"text": "Block Write Time (ms)",
340+
"text": "Block write time (ms)",
341341
"type": "number"
342342
},
343343
{
344344
"selector": "blk_write_time_per_sec",
345-
"text": "Block Write Time/sec (ms)",
345+
"text": "Block write time/sec (ms)",
346346
"type": "number"
347347
},
348348
{
349349
"selector": "blk_write_time_per_call",
350-
"text": "Block Write Time/call (ms)",
350+
"text": "Block write time/call (ms)",
351351
"type": "number"
352352
}
353353
],
@@ -395,37 +395,37 @@
395395
},
396396
"includeByName": {},
397397
"indexByName": {
398-
"Block Read Time (ms)": 27,
399-
"Block Read Time/call (ms)": 29,
400-
"Block Read Time/sec (ms)": 28,
401-
"Block Write Time (ms)": 24,
402-
"Block Write Time/call (ms)": 26,
403-
"Block Write Time/sec (ms)": 25,
398+
"Block read time (ms)": 27,
399+
"Block read time/call (ms)": 29,
400+
"Block read time/sec (ms)": 28,
401+
"Block write time (ms)": 24,
402+
"Block write time/call (ms)": 26,
403+
"Block write time/sec (ms)": 25,
404404
"Calls": 1,
405405
"Calls/sec": 2,
406406
"Duration (seconds)": 30,
407-
"Exec Time (ms)": 3,
408-
"Exec Time/call (ms)": 5,
409-
"Exec Time/sec (ms/s)": 4,
410-
"Planning Time (ms)": 6,
411-
"Planning Time/call (ms)": 8,
412-
"Planning Time/sec (ms/s)": 7,
407+
"Exec time (ms)": 3,
408+
"Exec time/call (ms)": 5,
409+
"Exec time/sec (ms/s)": 4,
410+
"Planning time (ms)": 6,
411+
"Planning time/call (ms)": 8,
412+
"Planning time/sec (ms/s)": 7,
413413
"Query ID": 0,
414414
"Rows": 9,
415415
"Rows/call": 11,
416416
"Rows/sec": 10,
417-
"Shared Blocks Dirtied": 21,
418-
"Shared Blocks Dirtied/call": 23,
419-
"Shared Blocks Dirtied/sec": 22,
420-
"Shared Blocks Hit": 12,
421-
"Shared Blocks Hit/call": 14,
422-
"Shared Blocks Hit/sec": 13,
423-
"Shared Blocks Read": 15,
424-
"Shared Blocks Read/call": 17,
425-
"Shared Blocks Read/sec": 16,
426-
"Shared Blocks Written": 18,
427-
"Shared Blocks Written/call": 20,
428-
"Shared Blocks Written/sec": 19
417+
"Shared blocks dirtied": 21,
418+
"Shared blocks dirtied/call": 23,
419+
"Shared blocks dirtied/sec": 22,
420+
"Shared blocks hit": 12,
421+
"Shared blocks hit/call": 14,
422+
"Shared blocks hit/sec": 13,
423+
"Shared blocks read": 15,
424+
"Shared blocks read/call": 17,
425+
"Shared blocks read/sec": 16,
426+
"Shared blocks written": 18,
427+
"Shared blocks written/call": 20,
428+
"Shared blocks written/sec": 19
429429
},
430430
"renameByName": {}
431431
}

0 commit comments

Comments
 (0)