Re: Hashjoin startup strategy (was Re: Getting different number of results when using hashjoin on/off) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Hashjoin startup strategy (was Re: Getting different number of results when using hashjoin on/off)
Date
Msg-id 17684.1133224461@sss.pgh.pa.us
Whole thread Raw
In response to Re: Getting different number of results when using hashjoin on/off  ("Mario Weilguni" <mario.weilguni@icomedias.com>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> I suspect this is obvious but since you asked, there isn't any way to keep
> around the hash table and just reuse it repeatedly instead of having to rescan
> the data over and over is there?

We already do that when possible --- which it's not in the particular
case at hand, because there's an outer-query parameter used in the
hashed subplan.

It occurs to me that the planner ought to favor putting parameterized
subplans on the outside of a hash join instead of the inside, so as to
make reuse more likely.  Not sure how to factor that into the cost
model though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Hashjoin startup strategy (was Re: Getting different number of results when using hashjoin on/off)
Next
From: "Jim C. Nasby"
Date:
Subject: Re: gprof SELECT COUNT(*) results