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
SELECT [b].[BlogId], [b].[OwnerId], [b].[Url], [p].[PersonId], [p].[Name], [p0].[PostId], [p0].[BlogId], [p0].[Content], [p0].[Title]
FROM [Blogs] AS [b]
INNER JOIN [Person] AS [p] ON [b].[OwnerId] = [p].[PersonId]
LEFT JOIN [Post] AS [p0] ON [b].[BlogId] = [p0].[BlogId]
ORDER BY [b].[BlogId], [p].[PersonId]
SELECT [b].[Url], [p].[Name], [b].[BlogId], [p].[PersonId], [p0].[Title], [p0].[PostId]
FROM [Blogs] AS [b]
INNER JOIN [Person] AS [p] ON [b].[OwnerId] = [p].[PersonId]
LEFT JOIN [Post] AS [p0] ON [b].[BlogId] = [p0].[BlogId]
ORDER BY [b].[BlogId], [p].[PersonId]
Also note that in split query mode, all reference navigations are included in each split query (#29182) and so these redundant ORDER BYs are also repeated in each split query.
The text was updated successfully, but these errors were encountered:
Note that we also have #29171, which is about removing all orderings. However, we're unlikely to do that in all cases, since that wouldn't leave any way to stream query results; for example, we may leave orderings for the non-tracked query case, in which case implementing this optimization may still be worth it.
In the below, adding
[p].[PersonId]
to theORDER BY
is (possibly) redundant as there is only one value per Blog, whose key came first in theORDER BY
.Full code
This is also relevant for projection, e.g. if the query is changed to
Also note that in split query mode, all reference navigations are included in each split query (#29182) and so these redundant
ORDER BY
s are also repeated in each split query.The text was updated successfully, but these errors were encountered: