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
Use IN instead of EXISTS with ExecuteDelete and entity containment #31386
When the base query is complex and can't be natively translated to DELETE, we fall back to placing it in a subquery and deleting all rows where the IDs match. For example, we currently generate:
DELETEFROM[o]FROM[OrderDetails]AS[o]
WHERE EXISTS(SELECT1FROM[Order Details]AS[o0]WHERE[o0].[OrderID]<10300AND[o0].[OrderID]=[o].[OrderID]AND[o0].[ProductID]=[o].[ProductID])
As we've seen in #30955, doing the same thing with IN can be far more efficient.
Activity
Use IN instead of EXISTS in more places
Use IN instead of EXISTS in more places
[-]Use IN instead of EXISTS with ExecuteUpdate/Delete[/-][+]Use IN instead of EXISTS with Delete[/+][-]Use IN instead of EXISTS with Delete[/-][+]Use IN instead of EXISTS with ExecuteDelete and entity containment[/+]Use IN instead of EXISTS in more places (#31387)