From 63fd86e432702d02ad8c64f3d9ff3acffd9e8718 Mon Sep 17 00:00:00 2001 From: Sergey Galuzo Date: Thu, 14 Dec 2023 14:57:48 -0800 Subject: [PATCH] Enble using old index on TokenSearchParam --- .../Features/Schema/Migrations/69.diff.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.Health.Fhir.SqlServer/Features/Schema/Migrations/69.diff.sql b/src/Microsoft.Health.Fhir.SqlServer/Features/Schema/Migrations/69.diff.sql index ba98ae9b1a..5c08f085e0 100644 --- a/src/Microsoft.Health.Fhir.SqlServer/Features/Schema/Migrations/69.diff.sql +++ b/src/Microsoft.Health.Fhir.SqlServer/Features/Schema/Migrations/69.diff.sql @@ -770,7 +770,7 @@ BEGIN TRY IF NOT EXISTS (SELECT * FROM #SearchParams A - INNER LOOP JOIN dbo.TokenSearchParam B ON B.ResourceTypeId = @ResourceTypeId AND B.SearchParamId = A.SearchParamId + INNER LOOP JOIN dbo.TokenSearchParam B ON B.ResourceTypeId = @ResourceTypeId AND B.SearchParamId = A.SearchParamId AND B.IsHistory = 0 ) BEGIN SET @CurrentMaxSurrogateId = NULL