Re: [HACKERS] Parallel seq. plan is not coming against inheritance orpartition table - Mailing list pgsql-hackers

From Ashutosh Sharma
Subject Re: [HACKERS] Parallel seq. plan is not coming against inheritance orpartition table
Date
Msg-id CAE9k0P=zuNHeLCrh5K0R0Hm23q4OaKO5OH6VuFmsOGPaXkj4ww@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Parallel seq. plan is not coming against inheritance orpartition table  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
>
> Right, but OTOH, if we assign parallel workers by default, then it is
> quite possible that it would result in much worse plans.  Consider a
> case where partition hierarchy has 1000 partitions and only one of
> them is big enough to allow parallel workers.  Now in this case, with
> your proposed fix it will try to scan all the partitions in parallel
> workers which I think can easily result in bad performance.

Right. But, there can also be a case where 999 partitions are large
and eligible for PSS. In such case as well, PSS won't be selected.

I think
> the right way to make such plans parallel is by using Parallel Append
> node (https://commitfest.postgresql.org/13/987/).  Alternatively, if
> you want to force parallelism in cases like the one you have shown in
> example, you can use Alter Table .. Set (parallel_workers = 1).

Okay, I was not aware of Parallel Append. Thanks.

With Regards,
Ashutosh Sharma
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] Print correct startup cost for the group aggregate.
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] dropping partitioned tables without CASCADE