Re: Removing INNER JOINs - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Removing INNER JOINs
Date
Msg-id 20141203164528.GD3342@tamriel.snowman.net
Whole thread Raw
In response to Re: Removing INNER JOINs  (Atri Sharma <atri.jiit@gmail.com>)
List pgsql-hackers
* Atri Sharma (atri.jiit@gmail.com) wrote:
> What I am concerned about is that in this case, the option plans are
> competing plans rather than separate plans.

Not sure I follow this thought entirely..  The plans in the plancache
are competeing, but 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.

The planner is aggressive at discarding potential paths, but this is all
a consideration for how expensive this particular optimization is, not
an issue with the approach itself.  We certainly don't want an
optimization that doubles the time for 100% of queries planned but only
saves time in 5% of the cases, but if we can spend an extra 5% of the
time required for planning in the 1% of cases where the optimization
could possibly happen to save a huge amount of time for those queries,
then it's something to consider.

We would definitely want to spend as little time as possible checking
for this optimization in cases where it isn't possible to use the
optimization.
Thanks,
    Stephen

pgsql-hackers by date:

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