Re: Sequential parallel scan / agg - Mailing list pgsql-general

From Tobias Bussmann
Subject Re: Sequential parallel scan / agg
Date
Msg-id 4A97A1CF-61E0-42AE-A7C0-9B5BCAC9C626@gmx.net
Whole thread Raw
In response to Sequential parallel scan / agg  (James Sewell <james.sewell@jirotech.com>)
List pgsql-general
Hi,

On 2016-11-13 23:04:44 +0000, James Sewell said:
>     1.    INSERT ... SELECT doesn't work
>     2.    WITH a AS (SELECT ...) INSERT FROM a doesn't work
>     3.    SELECT .. INTO doesn't work
>     4.    SELECT with no insert does work as expected
>>
>> CREATE TABLE blah AS SELECT ...  ?

Unfortunately, in these cases the current parallelism features cannot be used as all of these queries do write data.
Seein the doc [1] at "When Can Parallel Query Be Used?"  

> Even when it is in general possible for parallel query plans to be generated, the planner will not generate them for
agiven query if any of the following are true: 
>     •    The query writes any data or locks any database rows. If a query contains a data-modifying operation either
atthe top level or within a CTE, no parallel plans for that query will be generated. This is a limitation of the
currentimplementation which could be lifted in a future release. 

Best
Tobias

[1]: https://www.postgresql.org/docs/current/static/when-can-parallel-query-be-used.html



pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Request to share information regarding deadlock in postgresql-8.1.18
Next
From: valeriof
Date:
Subject: Converting a TimestampTz into a C# DateTime