Skip to content

Commit 73746da

Browse files
committed
Merge branch 'perf/apply-checkup-materialize-fk-indexes' into 'main'
perf(metrics): materialize fk_indexes CTE to avoid per-row catalog re-scan See merge request postgres-ai/postgresai!311
2 parents affff2d + 2fbccd1 commit 73746da

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

config/pgwatch-prometheus/metrics.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,7 @@ metrics:
24492449
cap, so its absence on healthy clusters is normal.
24502450
sqls:
24512451
11: |
2452-
with fk_indexes as ( /* pgwatch_generated */
2452+
with fk_indexes as materialized ( /* pgwatch_generated */
24532453
select
24542454
schemaname as schema_name,
24552455
indexrelid,
@@ -2589,7 +2589,7 @@ metrics:
25892589
≤100 redundant pairs, so its absence on healthy clusters is normal.
25902590
sqls:
25912591
11: |
2592-
with fk_indexes as ( /* pgwatch_generated */
2592+
with fk_indexes as materialized ( /* pgwatch_generated */
25932593
select
25942594
n.nspname as schema_name,
25952595
ci.relname as index_name,
@@ -2798,7 +2798,7 @@ metrics:
27982798
`HAVING count(*) > 0`) when ≤100 indexes match the unused filter.
27992799
sqls:
28002800
11: |
2801-
with fk_indexes as ( /* pgwatch_generated */
2801+
with fk_indexes as materialized ( /* pgwatch_generated */
28022802
select
28032803
n.nspname as schema_name,
28042804
ci.relname as index_name,
@@ -2954,7 +2954,7 @@ metrics:
29542954
entirely (via `HAVING count(*) > 0`) when ≤100 indexes match.
29552955
sqls:
29562956
11: |
2957-
with fk_indexes as ( /* pgwatch_generated */
2957+
with fk_indexes as materialized ( /* pgwatch_generated */
29582958
select
29592959
n.nspname as schema_name,
29602960
ci.relname as index_name,

0 commit comments

Comments
 (0)