Hi,
In case of NestLoop with parameterised inner semi-join for each outer
tuple requires only a single tuple from its inner relation to produce a
result. It seems that the same principle applies to an anti-join. This
approach could effectively allow the Memoize node to enhance the
performance of pulled-up EXISTS and NOT EXISTS sublinks.
In attachment see a sketch of the feature. Since we are using single_row
mode, adapting this method to cache semi-join inner results should not
be extremely complex. However, I am unsure about potential corner cases
and would appreciate any feedback or criticisms regarding this approach.
--
regards, Andrei Lepikhov