Re: 'IN' performance
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Cc: "Stephan Szabo" <sszabo@megazone23.bigpanda.com>, "MindTerm" <mindterm@yahoo.com>, pgsql-sql@postgresql.org
Date: 2001-12-17T06:44:03Z
Lists: 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