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
Review #1939 for code improvements: EXISTS runs its whole subquery for every outer row #2678
This is not a bug report. It is an invitation to look at #1939 again: the fix (a boolean from EXISTS) is right, but the line it touched runs the whole subquery for every outer row. The goal is to understand the change and decide whether anything should be improved. The notes below come from a quick read of the diff and one count, not from a timed measurement.
The concern:
EXISTS runs its subquery in full, once per outer row.ExistsValue.toJS (src/41exists.js) calls this.existsfn[i](params, null, p).data.length in the WHERE function. With 200 outer and 200 inner rows, the inner WHERE ran 40,000 times, for an uncorrelated subquery as well as a correlated one (counted with a user function, not timed).
Two things could cut this, independent of each other:
Activity
mathiasrw commentedon Nov 26, 2026
Will be covered by #3164.