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

Query: Avoid pushdown when joining with a subquery which can be lifted out #26476

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

smitpatel
Copy link
Contributor

@smitpatel smitpatel commented Oct 28, 2021

Part of #17622

Avoids pushdown for scenario when we cause pushdown due to order by but then we erase order by without skip take giving us simple and lift-able query again

@smitpatel smitpatel requested a review from a team October 28, 2021 02:04
Base automatically changed from smit/obsolete to main October 28, 2021 06:53
…d out

Part of #17622

Avoids pushdown for scenario when we cause pushdown due to order by but then we erase order by without skip take giving us simple and lift-able query again
@smitpatel
Copy link
Contributor Author

@dotnet/efteam - ping

@smitpatel smitpatel merged commit fa3cea4 into main Nov 12, 2021
@smitpatel smitpatel deleted the smit/simple branch November 12, 2021 03:20
FROM [LevelThree] AS [l1]
) AS [t1] ON [t0].[Id] = [t1].[OneToMany_Optional_Inverse3Id]
ORDER BY [l].[Id], [t0].[Id], [t1].[Id]");
LEFT JOIN [LevelThree] AS [l1] ON [t0].[Id] = [l1].[OneToMany_Optional_Inverse3Id]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ very cool, thanks for doing this @smitpatel!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love how implementing such a change has this ripple effect on queries, opening up other simplifications in turn.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's kind of like how inlining in real compilation opens the way for other optimization types... Not sure we have good examples of that in EF Core, but 🤣

@ajcvickers ajcvickers changed the title Query: Avoid pushdown when joining with a subquery which can be lifte… Query: Avoid pushdown when joining with a subquery which can be lifted out Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants