Skip to content

Commit 7dd6839

Browse files
authored
Avoid parameter sniffing for exists subquery
1 parent c860a3d commit 7dd6839

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

QueryBuilder/Base.Where.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,7 @@ public Q WhereExists(Query query)
527527

528528
// remove unneeded components
529529
query = query.Clone().ClearComponent("select")
530-
.SelectRaw("1")
531-
.Limit(1);
530+
.SelectRaw("1");
532531

533532
return AddComponent("where", new ExistsCondition
534533
{
@@ -690,4 +689,4 @@ public Q OrWhereNotTime(string column, object value)
690689
#endregion
691690

692691
}
693-
}
692+
}

0 commit comments

Comments
 (0)