efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Minor improvement of `SqlServerParameterBasedSqlProcessor.Optimize`

Open ranma42 opened this issue 1 year ago • 1 comments

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

ranma42 avatar May 19 '24 23:05 ranma42

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 avatar May 19 '24 23:05 ranma42

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

maumar avatar Jun 04 '24 00:06 maumar