Re: disfavoring unparameterized nested loops - Mailing list pgsql-hackers

From David Rowley
Subject Re: disfavoring unparameterized nested loops
Date
Msg-id CAApHDvofBE-oG998LnEWO6aOrZxnh11BtSOK9uDpjoFwahZ65A@mail.gmail.com
Whole thread Raw
In response to Re: disfavoring unparameterized nested loops  (Andrey Lepikhov <a.lepikhov@postgrespro.ru>)
Responses Re: disfavoring unparameterized nested loops  ("Lepikhov Andrei" <a.lepikhov@postgrespro.ru>)
List pgsql-hackers
On Wed, 20 Sept 2023 at 19:56, Andrey Lepikhov
<a.lepikhov@postgrespro.ru> wrote:
> What could you say about a different way: hybrid join? In MS SQL Server,
> they have such a feature [1], and, according to their description, it
> requires low overhead. They start from HashJoin and switch to NestLoop
> if the inner input contains too small tuples. It solves the issue, Isn't it?

A complexity which you may not be considering here is that Nested Loop
joins always preserve the tuple order from the outer side of the join,
whereas hash joins will not do this when multi-batching.

I've no idea how the SQL Server engineers solved that.

David

> [1]
> https://techcommunity.microsoft.com/t5/sql-server-blog/introducing-batch-mode-adaptive-joins/ba-p/385411



pgsql-hackers by date:

Previous
From: Kuwamura Masaki
Date:
Subject: Re: bug fix and documentation improvement about vacuumdb
Next
From: Dilip Kumar
Date:
Subject: Re: logical decoding and replication of sequences, take 2