Re: Parallel seq. plan is not coming against inheritance or partition table
Ashutosh Sharma <ashu.coek88@gmail.com>
From: Ashutosh Sharma <ashu.coek88@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>,
tushar <tushar.ahuja@enterprisedb.com>
Date: 2017-03-06T05:09:18Z
Lists: 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
Commits
-
Fix regression in parallel planning against inheritance tables.
- 2609e91fcf9d 10.0 landed
-
Replace min_parallel_relation_size with two new GUCs.
- 51ee6f3160d2 10.0 cited