Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding AsSingleQuery to EF joins #1393

Open
josephdecock opened this issue Aug 17, 2023 · 2 comments
Open

Consider adding AsSingleQuery to EF joins #1393

josephdecock opened this issue Aug 17, 2023 · 2 comments
Milestone

Comments

@josephdecock
Copy link
Member

EF generates warnings when you include multiple collections but don't specify if you want joins or multiple queries with AsSingleQuery or AsSplitQuery. The idea is to force developers to consider the performance implications of doing a lot of joins. I'm not aware of any of our queries likely causing a cartestian explosion, so we should tell EF not to worry about it by explicitly saying AsSingleQuery on our queries.

Reference: https://learn.microsoft.com/en-us/ef/core/querying/single-split-queries#enabling-split-queries-globally

@josephdecock josephdecock added this to the Future milestone Aug 17, 2023
@brockallen
Copy link
Member

Look into the older IS4 repo for something similar. We did have customers saying that single query was a problem.

@josephdecock
Copy link
Member Author

I didn't find anything just searching for "AsSingleQuery" or "AsSplitQuery" in the old issue tracker. I did find #705, where we are setting AsSplitQuery in one of the queries in the client store.

I don't think we should change any places where we are explicitly setting single or split query behavior. I want to be explicit where we currently are not, to reduce warnings (there was a support issue where someone noticed some warnings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants