EES-5256 Opt-out of OPENJSON subquery transformation in time periods query and revert #5002 #5006
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR opts-out of the
OPENJSON
subquery transformation of the location id's in the time periods metadata query and revert back to using an SQLIN
clause as was the behaviour prior to updating to Entity Framework Core 8.Prior to this change the query is translated using an
OPENJSON
subqueryWith this change, for multiple location id's the query is translated using
IN
For a single location id the query is now translated as
We will need to test this carefully as performance could be worse given that the constant location values in the SQL statement will result in unique query plans being generated as opposed to the previous parameterised version where the SQL statement remained constant.
Revert dependency downgrade made by #5002
This PR also reverts the changes made in #5002 which were going to downgrade EF 8.0.4 to 8.0.3 but this has not been deployed to any environment yet and is thought not be the cause of the degradation.