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

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Dimitrios Apostolou <jimis(at)gmx(dot)net>
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 13:34:05
Message-ID: CAApHDvr9_Mu51U6pFoc9EpOP3U_gxjn4-qBBPRTQMW3d3+NXpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 14 May 2024 at 00:46, Dimitrios Apostolou <jimis(at)gmx(dot)net> wrote:
>
> On Mon, 13 May 2024, Dimitrios Apostolou wrote:
>
> > On Sat, 11 May 2024, David Rowley wrote:
> >> If you look at [1], it says "Tuples changed in partitions and
> >> inheritance children do not trigger analyze on the parent table."
> >

> Do I read that correctly, that I have to setup cron jobs to manually
> analyze partitioned tables?

It means that auto-analyze won't touch it. Periodically doing an
ANALYZE on the partitioned table is probably a good idea.

David

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dimitrios Apostolou 2024-05-13 13:52:42 Re: SELECT DISTINCT chooses parallel seqscan instead of indexscan on huge table with 1000 partitions
Previous Message David Rowley 2024-05-13 13:32:02 Re: SELECT DISTINCT chooses parallel seqscan instead of indexscan on huge table with 1000 partitions