Re: Removing INNER JOINs - Mailing list pgsql-hackers

From Atri Sharma
Subject Re: Removing INNER JOINs
Date
Msg-id CAOeZVichLeyn=K4mwCJTwCrzGUaKXK+KSYz06rSAn0xpTCV2=A@mail.gmail.com
Whole thread Raw
In response to Re: Removing INNER JOINs  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Removing INNER JOINs  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers


On Wed, Dec 3, 2014 at 8:32 PM, Stephen Frost <sfrost@snowman.net> wrote:
* Atri Sharma (atri.jiit@gmail.com) wrote:
> So the planner keeps all possibility satisfying plans, or it looks at the
> possible conditions (like presence of foreign key for this case, for eg)
> and then lets executor choose between them?

Right, this was one of the thoughts that I had.

> So is the idea essentially making the planner return a set of "best" plans,
> one for each condition? Are we assured of their optimality at the local
> level i.e. at each possibility?

We *already* have an idea of there being multiple plans (see
plancache.c).


Thanks for pointing me there.

What I am concerned about is that in this case, the option plans are competing plans rather than separate plans.

My main concern is that we might be not able to discard plans that we know that are not optimal early in planning. My understanding is that planner is aggressive when discarding potential paths. Maintaining them ahead and storing and returning them might have issues, but that is only my thought.



--
Regards,
 
Atri
l'apprenant

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Removing INNER JOINs
Next
From: Andres Freund
Date:
Subject: Re: Removing INNER JOINs