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: Flatten out subquery models at query optimizer #7613
'from Customer c in
from Customer c in DbSet<Customer>
where c.City == "Seattle"
order by c.CustomerID asc
select c
where c.CustomerID == "ALFKI"
select c'
Query model like above can be optimized by merging the bodyclauses.
Points to consider:
Inner selector is selecting query source directly.
No multiple from clauses inside subquery
Presently ReLinq blocks lifting of subquery if there is orderby clause due to possible ambiguity in ordering. We can still lift if only one (inner or outer) contains OrderBy clause.
Activity
BladeWise commentedon Feb 21, 2017
Would this scenario be covered by such optiimization?
In this case the generated query is
while the optimal result would be
smitpatel commentedon Apr 4, 2017
@maumar - Assigning this to you as this is lifting of order by.
maumar commentedon Apr 5, 2017
fixed in f022d66