From 8324f130cd472dd1f5a61a10066944813636ef87 Mon Sep 17 00:00:00 2001 From: dongmucat <1127093059@qq.com> Date: Fri, 8 May 2026 14:42:27 +0800 Subject: [PATCH] fix(namespace): add index on promotion_request.target_namespace_id The existsByTargetNamespaceId query used in namespace deletion dependency checks was missing an index, causing a sequential scan. --- .../V41__add_promotion_request_target_namespace_index.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 server/skillhub-app/src/main/resources/db/migration/V41__add_promotion_request_target_namespace_index.sql diff --git a/server/skillhub-app/src/main/resources/db/migration/V41__add_promotion_request_target_namespace_index.sql b/server/skillhub-app/src/main/resources/db/migration/V41__add_promotion_request_target_namespace_index.sql new file mode 100644 index 00000000..bf581892 --- /dev/null +++ b/server/skillhub-app/src/main/resources/db/migration/V41__add_promotion_request_target_namespace_index.sql @@ -0,0 +1 @@ +CREATE INDEX idx_promotion_request_target_namespace ON promotion_request(target_namespace_id);