Re: Removing INNER JOINs - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Removing INNER JOINs
Date
Msg-id 20141203155620.GB2456@alap3.anarazel.de
Whole thread Raw
In response to Re: Removing INNER JOINs  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Removing INNER JOINs  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2014-12-03 10:51:19 -0500, Robert Haas wrote:
> On Wed, Dec 3, 2014 at 4:29 AM, David Rowley <dgrowleyml@gmail.com> wrote:
> > *** Method 1: Removing Inner Joins at planning time:
> >
> > *** Method 2: Marking scans as possibly skippable during planning, and
> > skipping joins at execution (Andres' method)
> >
> > *** Method 3: Marking scans as possibly skippable during planning and
> > removing redundant join nodes at executor startup (Simon's method)
> [....]
> > a. can we invoke the planner during executor init?
> 
> I'm pretty sure that we can't safely invoke the planner during
> executor startup, and that doing surgery on the plan tree (option #3)
> is unsafe also.  I'm pretty clear why the latter is unsafe: it might
> be a copy of a data structure that's going to be reused.

We already have a transformation between the plan and execution
tree. I'm right now not seing why transforming the trees in
ExecInitNode() et. al. would be unsafe - it looks fairly simple to
switch between different execution plans there.

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Atri Sharma
Date:
Subject: Re: Removing INNER JOINs
Next
From: Robert Haas
Date:
Subject: Re: tracking commit timestamps