Skip to content

Commit

Permalink
fix: Removed .AsSingleQuery from EndUser Search query (#1707)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->
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)
  • Loading branch information
knuhau authored Jan 18, 2025
1 parent ce0a07d commit 2a3153b
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ public async Task<SearchDialogResult> Handle(SearchDialogQuery request, Cancella

var paginatedList = await _db.Dialogs
.PrefilterAuthorizedDialogs(authorizedResources)
.AsSingleQuery()
.AsNoTracking()
.Include(x => x.Content)
.ThenInclude(x => x.Value.Localizations)
Expand Down

0 comments on commit 2a3153b

Please sign in to comment.