Re: Explanation for bug #13908: hash joins are badly broken

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Explanation for bug #13908: hash joins are badly broken
Date: 2016-02-06 21:22:26
Message-ID: 24302.1454793746@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-02-06 22:11:07 Recently added typedef "string" is a horrid idea
Previous Message Tom Lane 2016-02-06 21:18:43 Re: Explanation for bug #13908: hash joins are badly broken