Re: Removing INNER JOINs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Removing INNER JOINs
Date
Msg-id 22157.1417633707@sss.pgh.pa.us
Whole thread Raw
In response to Re: Removing INNER JOINs  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Removing INNER JOINs  ("ktm@rice.edu" <ktm@rice.edu>)
Re: Removing INNER JOINs  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> Do you need to plan for every combination, where some joins are removed 
> and some are not?

I would vote for just having two plans and one switch node.  To exploit
any finer grain, we'd have to have infrastructure that would let us figure
out *which* constraints pending triggers might indicate transient
invalidity of, and that doesn't seem likely to be worth the trouble.

> I hope the same mechanism could be used to prepare a plan for a query 
> with parameters, where the parameters might or might not allow a partial 
> index to be used. We have some smarts nowadays to use custom plans, but 
> this could be better.

Interesting thought, but that would be a totally different switch
condition ...
        regards, tom lane



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Removing INNER JOINs
Next
From: "ktm@rice.edu"
Date:
Subject: Re: Removing INNER JOINs