Re: Explanation for bug #13908: hash joins are badly broken - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Explanation for bug #13908: hash joins are badly broken
Date
Msg-id 24302.1454793746@sss.pgh.pa.us
Whole thread Raw
In response to Re: Explanation for bug #13908: hash joins are badly broken  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: Explanation for bug #13908: hash joins are badly broken
List pgsql-hackers
Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> What about using the dense allocation even for the skew buckets, but not 
> one context for all skew buckets but one per bucket? Then when we delete 
> a bucket, we simply destroy the context (and free the chunks, just like 
> we do with the current dense allocator).

Yeah, I was wondering about that too, but it only works if you have quite
a few tuples per skew bucket, else you waste a lot of space.  And you were
right upthread that what we're collecting is keys expected to be common in
the outer table, not the inner table.  So it's entirely likely that the
typical case is just one inner tuple per skew bucket.  (Should check that
out though ...)
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Explanation for bug #13908: hash joins are badly broken
Next
From: Tom Lane
Date:
Subject: Recently added typedef "string" is a horrid idea