Re: should we have a fast-path planning for OLTP starjoins? - Mailing list pgsql-hackers

From James Hunter
Subject Re: should we have a fast-path planning for OLTP starjoins?
Date
Msg-id CAJVSvF7yu0fypZPymFRBJks4_Fg_TakxVgd5gJVNvCx8+0tdmw@mail.gmail.com
Whole thread Raw
In response to Re: should we have a fast-path planning for OLTP starjoins?  (Tomas Vondra <tomas@vondra.me>)
Responses Re: should we have a fast-path planning for OLTP starjoins?
List pgsql-hackers
On Fri, Feb 7, 2025 at 12:09 PM Tomas Vondra <tomas@vondra.me> wrote:
> ...
> Yes, I think that's pretty much the idea. Except that I don't think we
> need to look at the |F| at all - it will have more impact for small |F|,
> of course, but it doesn't hurt for large |F|.
>
> I think it'll probably need to consider which joins increase/decrease
> the cardinality, and "inject" the dimension joins in between those.

YMMV, but I suspect you may find it much easier to look at |F|, |F
JOIN D1|, |(F JOIN D1) JOIN D2|, etc., than to consider |F JOIN D1| /
|F|, etc. (In other words, I suspect that considering absolute
cardinalities will end up easier/cleaner than considering ratios of
increases/decreases in cardinalities.) But I have not thought about
this much, so I am not putting too much weight on my suspicions.

James



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cross-type index comparison support in contrib/btree_gin
Next
From: Melanie Plageman
Date:
Subject: Re: pgbench with partitioned tables