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

Minor improvement of SqlServerParameterBasedSqlProcessor.Optimize #33758

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

ranma42
Copy link
Contributor

@ranma42 ranma42 commented May 19, 2024

Running the SkipTakeCollapsingExpressionVisitor before RelationalParameterBasedSqlProcessor.Optimize opens up some additional query optimization opportunities that can lead to a simpler query.

This opens up some additional query optimization opportunities.
@ranma42
Copy link
Contributor Author

ranma42 commented May 19, 2024

This was found while investigating #33752, but is actually unrelated to that issue.
Note that there is no real bug here, except for a complex query where a simpler one would suffice.
AFAICT there is not issue tracking this.

@ranma42 ranma42 marked this pull request as ready for review May 19, 2024 23:43
@roji roji requested a review from maumar May 21, 2024 14:09
@maumar maumar merged commit abfc584 into dotnet:main Jun 4, 2024
7 checks passed
@maumar
Copy link
Contributor

maumar commented Jun 4, 2024

I'm always a bit scared when changing order of operations in the optimizer, but this one should be safe. Thanks @ranma42

@ranma42 ranma42 deleted the simplify-sqlserver-compare branch June 5, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants