routier-collection / core/src / DEFAULT_SEMI_JOIN_KEY_THRESHOLD
Variable: DEFAULT_SEMI_JOIN_KEY_THRESHOLD
constDEFAULT_SEMI_JOIN_KEY_THRESHOLD:500=500
Defined in: core/src/plugins/query/join.ts:238
How many distinct outer keys are still worth turning into an IN (...) prefilter.
A cost decision, never a correctness one: above the threshold the inner side is read under its own scopes and the hash join discards the surplus, which is the same answer by a slower route. 500 because a bound-parameter list is cheap in the hundreds and starts costing more than the scan it saves in the thousands — and some engines refuse a list that long outright.