Re: hashjoins vs. Bloom filters (yet again) - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: hashjoins vs. Bloom filters (yet again)
Date
Msg-id bec6e30c-775f-4ade-9480-59dcab473441@vondra.me
Whole thread
List 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




pgsql-hackers by date:

Previous
From: "Matheus Alcantara"
Date:
Subject: Re: hashjoins vs. Bloom filters (yet again)
Next
From: Michael Paquier
Date:
Subject: Re: Change checkpoint‑record‑missing PANIC to FATAL