Re: MergeJoin beats HashJoin in the case of multiple hash clauses

From: Tender Wang <tndrwang(at)gmail(dot)com>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrei Lepikhov <lepihov(at)gmail(dot)com>
Subject: Re: MergeJoin beats HashJoin in the case of multiple hash clauses
Date: 2025-07-08 00:52:13
Message-ID: CAHewXNnHBOO9NEa=NBDYOrwZL4oHu2NOcTYvqyNyWEswo8f5OQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tender Wang <tndrwang(at)gmail(dot)com> 于2025年7月3日周四 17:48写道:

>
>
> Andrei Lepikhov <lepihov(at)gmail(dot)com> 于2025年7月3日周四 17:23写道:
>
>> On 3/7/2025 04:02, Tender Wang wrote:
>> >
>> >
>> > Andrei Lepikhov <lepihov(at)gmail(dot)com <mailto:lepihov(at)gmail(dot)com>> 于2025年7
>> > 月2日周三 22:29写道:
>> >
>> > On 30/6/2025 04:38, Tender Wang wrote:
>> > > Do you think it's worth doing this?
>> > >
>> > >
>> > > Hi all,
>> > >
>> > > I have added this patch to commitfest[1]. I'm hoping someone can
>> > review
>> > > it for me.
>> > It makes sense to apply. If you return the comment to its place, you
>> > may
>> > reduce the patch size even more.
>> >
>> >
>> > Thanks for reviewing. I returned the comment to its place. Please
>> review
>> > the attached patch.
>> Do you really need to initialise clauses with the NIL value? I guess, it
>> may be avoided because later you non-alternatively init it with a copy
>> of hash clauses.
>>
>
> Yeah, no need to initialize clauses to NIL.
>

Please take a look at the attached v3 patch.
And I have changed the status to Ready for Committer in the [1].

[1] https://commitfest.postgresql.org/patch/5704/

--
Thanks,
Tender Wang

Attachment Content-Type Size
v3-0001-If-we-have-a-single-hashclause-list_copy-hashclau.patch application/octet-stream 1.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2025-07-08 00:56:03 Re: Remaining dependency on setlocale()
Previous Message Vik Fearing 2025-07-08 00:46:17 Re: What is a typical precision of gettimeofday()?