From 78ec6c1180bfd0d200f09953e71b54064ac165db Mon Sep 17 00:00:00 2001 From: Arunima George Date: Mon, 20 Apr 2026 16:45:35 +0100 Subject: [PATCH] TD-7133: Added Index to UserUserGroup table. --- .../LearningHub.Nhs.Database.sqlproj | 3 +++ .../Post-Deploy/Scripts/TD-7133_AddIndexUserUserGroup.sql | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/TD-7133_AddIndexUserUserGroup.sql diff --git a/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj b/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj index 5b4022af..579dc74a 100644 --- a/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj +++ b/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj @@ -640,4 +640,7 @@ + + + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/TD-7133_AddIndexUserUserGroup.sql b/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/TD-7133_AddIndexUserUserGroup.sql new file mode 100644 index 00000000..00d89d0d --- /dev/null +++ b/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/TD-7133_AddIndexUserUserGroup.sql @@ -0,0 +1,6 @@ +IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name='IX_UserUserGroup_UserId_Deleted' AND object_id = OBJECT_ID('[hub].[UserUserGroup]')) +BEGIN +CREATE INDEX IX_UserUserGroup_UserId_Deleted +ON hub.UserUserGroup (UserId, Deleted) +INCLUDE (UserGroupId) WITH (FILLFACTOR = 95); +END \ No newline at end of file