You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Query: JOIN/Left-outer-join queries wrapped in client projection could be simplified to ShapedQueries to reduce client evaluation #7648
Currently we produce client join here because the outer element (which is a join itself) has a client projection. However, we only project Outer element of that translated join, so it could be simplified to ShapedQuery.
This in turn would allow outer join to get simplified - currently we don't try to translate joins if one of the elements has a client projection (see RelationalQueryModelVisitor.CanFlattenJoin)
SELECT [t].[Level1_Required_Id], [t].[Name]
FROM (
SELECT TOP(@__p_0) [l2_inner].*FROM [Level2] AS [l2_inner]
INNER JOIN [Level1] AS [l1_inner] ON [l2_inner].[Level1_Required_Id] = [l1_inner].[Id]
) AS [t]
LEFT OUTER JOIN [Level1] as [l1_outer] ON [t].[Level1_Required_Id] = [l1_outer].[Id]
changed the title [-]Query/Cleanup : JOIN/LOJ queries wrapped in client projection could be simplified to ShapedQueries to reduce client evaluation[/-][+]Query: JOIN/Left-outer-join queries wrapped in client projection could be simplified to ShapedQueries to reduce client evaluation[/+]on May 9, 2017
Activity
smitpatel commentedon Feb 17, 2017
What would be the SelectExpression for server translated join?
maumar commentedon Feb 17, 2017
and then client projection on top of that
maumar commentedon Mar 28, 2017
Fixed in 74b7e4d
[-]Query/Cleanup : JOIN/LOJ queries wrapped in client projection could be simplified to ShapedQueries to reduce client evaluation[/-][+]Query: JOIN/Left-outer-join queries wrapped in client projection could be simplified to ShapedQueries to reduce client evaluation[/+]