Re: Design notes for EquivalenceClasses - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Design notes for EquivalenceClasses
Date
Msg-id 1169120213.3927.83.camel@silverbirch.site
Whole thread Raw
In response to Re: Design notes for EquivalenceClasses  (Gavin Sherry <swm@linuxworld.com.au>)
List pgsql-hackers
On Thu, 2007-01-18 at 11:53 +1100, Gavin Sherry wrote:
> the major rule in the executor: do what ever the plan tells you to do.

I thought the rule was: do what the plan tells you to do, as efficiently
as possible.

Turning an explicit step into a no-op seems like great execution to me.

In the case you mention, the HashJoin node already looks inside its Hash
node child. It seems possible to have the Sort node check at ExecInit
time that it is sitting on a HashJoin node, so that at Exec time it can
ask the HashJoin node whether the Hash node has spilled to disk or not.
If not, it can just pass the rows through as a no-op.

We could formalise a "last words" API so that parent nodes sometimes
calls child nodes before they execute them, or maybe just leave it
somewhat dirty as the H/HJ communication is now.

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: Roman Kononov
Date:
Subject: Re: [PATCHES] [BUGS] BUG #2846: inconsistent and confusing handling
Next
From: Andrew Dunstan
Date:
Subject: Re: ideas for auto-processing patches