Re: Removing INNER JOINs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Removing INNER JOINs
Date
Msg-id 19875.1417628950@sss.pgh.pa.us
Whole thread Raw
In response to Re: Removing INNER JOINs  (Atri Sharma <atri.jiit@gmail.com>)
Responses Re: Removing INNER JOINs  (Atri Sharma <atri.jiit@gmail.com>)
List pgsql-hackers
Atri Sharma <atri.jiit@gmail.com> writes:
> Is it possible to only replan part of the plan in case of this
> optimization? I think that we might need to only replan parts of the
> original plan (as you mentioned, join search and above). So we could reuse
> the original plan in part and not do a lot of replanning (an obvious case
> is scan strategy, which we can assume will not change for the two plans).

I think you assume wrong; or at least, I certainly would not wish to
hard-wire any such assumption.  Skipping some joins could change the
shape of the join tree *completely*, because the cost estimates will
change so much.  And that could in turn lead to making different choices
of scan methods, eg, we might or might not care about sort order of
a scan result if we change join methods.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: changing primary key col(s) with minimal impact
Next
From: Atri Sharma
Date:
Subject: Re: Removing INNER JOINs