Merge pull request #34272 from backstage/freben/relations-target-index

catalog-backend: add missing index on relations.target_entity_ref
This commit is contained in:
Fredrik Adelöw
2026-05-19 11:43:39 +02:00
committed by GitHub
4 changed files with 169 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': patch
---
Added a missing index on `relations.target_entity_ref`. Several query paths (orphan deletion, entity ancestry, eager pruning) join or filter on this column, but no index existed — causing full sequential scans of the relations table on every invocation. On a production catalog with ~3.5M relation rows, individual lookups were taking ~122ms (full table scan) instead of <1ms (index scan).