Re: hashjoins vs. Bloom filters (yet again)

From: Tomas Vondra <tomas(at)vondra(dot)me>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Oleg Bartunov <obartunov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hashjoins vs. Bloom filters (yet again)
Date: 2026-07-13 22:54:16
Message-ID: bec6e30c-775f-4ade-9480-59dcab473441@vondra.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7/14/26 00:09, Tomas Vondra wrote:
> ...
>
> In the first plan, we have very limited pushdown options. We really want
> to push filters to the fact_table scan, but let's add a selective WHERE
> condition on dim_2. That won't add any filters on fact_table, because
> the patch only looks at the join clauses and fact_table joins only with
> dim_1 (and that filters nothing).
>
> We might add a filter from dim_2 to dim_1, although that does not seem
> to happen with the v4 patch for some reason (seems like a bug).
>

FWIW this happens because we only ever construct hashjoins with
cheapest_total_path (and the parameterized version), and those don't
include paths expecting pushed-down filters. So it's not really a bug,
but something we'd probably want to relax, to allow pushing filters to
this side of the join too.

I haven't done anything about it, but it seems somewhat mechanical.
Of course, it would increase the number of paths explored.

regards

--
Tomas Vondra

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-07-13 23:01:20 Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements
Previous Message Matheus Alcantara 2026-07-13 22:51:16 Re: hashjoins vs. Bloom filters (yet again)