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

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dimitrios Apostolou <jimis(at)gmx(dot)net>, 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-11 01:37:10
Message-ID: CAApHDvqWfGdUpTUp9s7AZYSeh44aLEXoBQS7UcfKM0zKhTCkiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

David

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message WU Yan 2024-05-11 03:27:40 Unnecessary buffer usage with multicolumn index, row comparison, and equility constraint
Previous Message David Rowley 2024-05-11 01:35:44 Re: SELECT DISTINCT chooses parallel seqscan instead of indexscan on huge table with 1000 partitions