Re: Should HashSetOp go away - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Should HashSetOp go away
Date
Msg-id 2277801.1761517193@sss.pgh.pa.us
Whole thread Raw
In response to Re: Should HashSetOp go away  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> If Hash Joins did support IS NOT DISTINCT FROM clauses, then at least
> the non-ALL cases could be done with Hash Semi Join and Hash Anti Join
> for INTERSECT and EXCEPT, respectively, followed by a HashAgg. I doubt
> it would be any faster for the general case, but at least it would
> allow those setop queries to run when the inputs don't fit in memory.
> It's not ideal though, as when the planner underestimates, Hashed
> Setops could still blow up.

Yeah.  As I hinted before, I think a better answer would be to teach
TupleHashTables to be able to spill to disk at need.  No idea how
much work that would be, but it would fix all users of that code
not just one of them.

            regards, tom lane



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Use BumpContext contexts for TupleHashTables' tablecxt
Next
From: Tom Lane
Date:
Subject: Re: Use BumpContext contexts for TupleHashTables' tablecxt