From 2a3153b216f6a9e02ebef4d343d52f7b83cd248d Mon Sep 17 00:00:00 2001 From: Knut Haug <154342485+knuhau@users.noreply.github.com> Date: Sat, 18 Jan 2025 13:12:38 +0100 Subject: [PATCH] fix: Removed .AsSingleQuery from EndUser Search query (#1707) ## Description Removed .AsSingleQuery from EndUser Search query. Tested locally with 50 million dialogs. Results show that the removal of .AsSingleQuery() brings Enduser Search query performance up to par with that of ServiceOwner Search. We should seek further improvements as well, as query scaling seems to be an issue. ## Related Issue(s) - #1706 ## Verification - [x] **Your** code builds clean without any errors or warnings - [x] Manual testing done (required) - [ ] Relevant automated test added (if you find this hard, leave it and we'll help out) ## Documentation - [ ] Documentation is updated (either in `docs`-directory, Altinnpedia or a separate linked PR in [altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if applicable) --- .../V1/EndUser/Dialogs/Queries/Search/SearchDialogQuery.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Search/SearchDialogQuery.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Search/SearchDialogQuery.cs index 75b58e30e..70d740db4 100644 --- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Search/SearchDialogQuery.cs +++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Search/SearchDialogQuery.cs @@ -158,7 +158,6 @@ public async Task Handle(SearchDialogQuery request, Cancella var paginatedList = await _db.Dialogs .PrefilterAuthorizedDialogs(authorizedResources) - .AsSingleQuery() .AsNoTracking() .Include(x => x.Content) .ThenInclude(x => x.Value.Localizations)