Re: Removing INNER JOINs

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mart Kelder <mart(at)kelder31(dot)nl>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Removing INNER JOINs
Date: 2014-12-03 15:45:59
Message-ID: 20141203154559.GA2456@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-12-03 11:30:32 +0000, Simon Riggs wrote:
> I guess we need an Option node. Tom and I discussed that about an aeon ago.
>
> The Option node has a plan for each situation. At execution time, we
> make the test specified in the plan and then select the appropriate
> subplan.
>
> That way we can see what is happening in the plan and the executor
> doesn't need to edit anything.

Given David's result where he noticed a performance impact due to the
additional branch in the join code - which I still have a bit of a hard
time to believe - it seems likely that a whole separate node that has to
pass stuff around will be more expensive.

I think the switch would actually have to be done in ExecInitNode() et
al. David, if you essentially take your previous solution and move the
if into ExecInitNode(), does it work well?

Greetings,

Andres Freund

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-12-03 15:51:19 Re: Removing INNER JOINs
Previous Message Sameer Kumar 2014-12-03 15:23:27 Re: Using pg_rewind for differential backup