Re: An improvement on parallel DISTINCT

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: An improvement on parallel DISTINCT
Date: 2024-02-02 11:35:52
Message-ID: CAApHDvp9W1Pj_j5yVj=ykP+CU05DaEjqZEsMkwCdZwe4VXWOPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2 Feb 2024 at 23:39, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> I'll push the patch shortly.

I've pushed the partial path sort part.

Now for the other stuff you had. I didn't really like this part:

+ /*
+ * Set target for partial_distinct_rel as generate_useful_gather_paths
+ * requires that the input rel has a valid reltarget.
+ */
+ partial_distinct_rel->reltarget = cheapest_partial_path->pathtarget;

I think we should just make it work the same way as
create_grouping_paths(), where grouping_target is passed as a
parameter.

I've done it that way in the attached.

David

Attachment Content-Type Size
fixup_pathtarget_for_partial_distinct_rel.patch text/plain 4.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2024-02-02 11:47:02 Re: [PoC] Improve dead tuple storage for lazy vacuum
Previous Message Ranier Vilela 2024-02-02 11:20:30 Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)