Memoize ANTI and SEMI JOIN inner - Mailing list pgsql-hackers

From Andrei Lepikhov
Subject Memoize ANTI and SEMI JOIN inner
Date
Msg-id 60bf8d26-7c7e-4915-b544-afdb9020011d@gmail.com
Whole thread Raw
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: "Euler Taveira"
Date:
Subject: Re: Separate GUC for replication origins
Next
From: Dave Page
Date:
Subject: Re: History doc page clarification on naming