| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Boom filters for hash joins (was: A design for amcheck heapam verification) |
| Date: | 2017-09-19 00:55:15 |
| Message-ID: | CA+Tgmoay+OObgk0N5TnU8-w-RKjTV3ugua+Qhbtiohym2fFuUQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Sep 18, 2017 at 5:13 PM, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> On Mon, Sep 18, 2017 at 2:07 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Mon, Sep 18, 2017 at 1:29 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Uh, why does the planner need to be involved at all?
>>
>> Because it loses if the Bloom filter fails to filter anything. That's
>> not at all far-fetched; consider SELECT * FROM a.x, b.x WHERE a.x =
>> b.x given a foreign key on a.x referencing b(x).
>
> Wouldn't a merge join be a lot more likely in this case anyway? Low
> selectivity hash joins with multiple batches are inherently slow; the
> wasted overhead of using a bloom filter may not matter.
>
> Obviously this is all pretty speculative. I suspect that this could be
> true, and it seems worth investigating that framing of the problem
> first.
ISTR Tomas Vondra doing some experiments with this a few years ago and
finding that it was, in fact, a problem.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2017-09-19 00:56:07 | Re: valgrind vs. shared typmod registry |
| Previous Message | Andres Freund | 2017-09-19 00:39:27 | pgsql: Add test for postmaster crash restarts. |