Skip to content

Commit 8a653f7

Browse files
committed
Add sizing note in metric description
1 parent 369160d commit 8a653f7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

internal/metrics/metrics.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4192,6 +4192,7 @@ metrics:
41924192
Estimates B-tree indexes bloat by comparing actual index size against expected size derived from pg_stats and pg_class catalog metadata.
41934193
It reports bloat percentage, real size, extra bloat bytes, and fillfactor for each index, helping identify candidates for REINDEX or maintenance.
41944194
Based on the bloat estimation queries from https://github.com/ioguix/pgsql-bloat-estimation.
4195+
**Note - The query filters to bloated indexes over 1 MiB; for large databases, you might only care about indexes over 100 MiB or so**
41954196
sqls:
41964197
14: |-
41974198
SELECT /* pgwatch_generated */
@@ -4297,7 +4298,7 @@ metrics:
42974298
(bs * relpages::float / (1024 * 1024)) > 1 /* exclude indexes below 1 MiB */
42984299
AND relpages > est_pages_ff
42994300
ORDER BY is_na, bloat_pct desc
4300-
LIMIT 100
4301+
LIMIT 100;
43014302
gauges:
43024303
- real_size
43034304
- extra_size

0 commit comments

Comments
 (0)