Re: SELECT DISTINCT chooses parallel seqscan instead of indexscan on huge table with 1000 partitions

From: Dimitrios Apostolou <jimis(at)gmx(dot)net>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: SELECT DISTINCT chooses parallel seqscan instead of indexscan on huge table with 1000 partitions
Date: 2024-05-13 12:27:57
Message-ID: 2e3947bd-b01c-37c8-00e1-d8e925e79597@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 11 May 2024, David Rowley wrote:

> On Sat, 11 May 2024 at 13:33, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I do kind of wonder why it's producing both a hashagg and a Unique
>> step --- seems like it should do one or the other.
>
> It still needs to make the duplicate groups from parallel workers unique.

Range partitioning of the table guarantees that, since the ranges are not
overlapping.

Dimitris

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dimitrios Apostolou 2024-05-13 12:41:05 Re: SELECT DISTINCT chooses parallel seqscan instead of indexscan on huge table with 1000 partitions
Previous Message Vidyashree H S 2024-05-13 06:38:39 Re: Postgresql active-active nodes in cluster