Re: SELECT DISTINCT chooses parallel seqscan instead of indexscan on huge table with 1000 partitions - Mailing list pgsql-general

From Dimitrios Apostolou
Subject Re: SELECT DISTINCT chooses parallel seqscan instead of indexscan on huge table with 1000 partitions
Date
Msg-id 5dfcb84a-2d32-8dde-772b-4305a7468774@gmx.net
Whole thread Raw
In response to Re: SELECT DISTINCT chooses parallel seqscan instead of indexscan on huge table with 1000 partitions  (Dimitrios Apostolou <jimis@gmx.net>)
List pgsql-general
On Tue, 14 May 2024, Dimitrios Apostolou wrote:
>
> It took long but if finished:
>
> ANALYZE
> Time: 19177398.025 ms (05:19:37.398)

I see now that default_statistics_target is globally set to 500, so this
is probably the reason it took so long. I guess with the default of 100,
it would take approximately one hour. This is much better to have in a
cron job. :-)

Dimitris





pgsql-general by date:

Previous
From: Muhammad Imtiaz
Date:
Subject: Re: Valid until
Next
From: Dimitrios Apostolou
Date:
Subject: Re: SELECT DISTINCT chooses parallel seqscan instead of indexscan on huge table with 1000 partitions