Re: 'IN' performance - Mailing list pgsql-sql

From Tom Lane
Subject Re: 'IN' performance
Date
Msg-id 29730.1008571443@sss.pgh.pa.us
Whole thread Raw
In response to 'IN' performance  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-sql
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> That's what I was thinking...where abouts does all that activity happen?

The infrastructure for different join rules already exists.  There'd
need to be a new JOIN_xxx type added to the various join nodes in the
executor, but AFAICS that's just a minor extension.  The part that is
perhaps not trivial is in the planner.  All the existing inner and outer
join types start out expressed as joins in the original query.  To make
IN into a join, the planner would have to hoist up a clause from WHERE
into the join-tree structure.  I think it can be done, but I have not
thought hard about where and how, nor about what semantic restrictions
might need to be checked.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: 'IN' performance
Next
From: "Henshall, Stuart - WCP"
Date:
Subject: Re: weird duplicate data problem