On Wed, Dec 3, 2014 at 8:32 PM, Stephen Frost <sfr...@snowman.net> wrote:

> * Atri Sharma (atri.j...@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*

Reply via email to