Re: Sequential parallel scan / agg

From: Tobias Bussmann <t(dot)bussmann(at)gmx(dot)net>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Cc: James Sewell <james(dot)sewell(at)jirotech(dot)com>
Subject: Re: Sequential parallel scan / agg
Date: 2016-11-14 10:36:07
Message-ID: 4A97A1CF-61E0-42AE-A7C0-9B5BCAC9C626@gmx.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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. See in 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 a given 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 at the top level or within a CTE, no parallel plans for that query will be generated. This is a limitation of the current implementation which could be lifted in a future release.

Best
Tobias

[1]: https://stream.boxwatch.ru/docs/current/static/when-can-parallel-query-be-used.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message valeriof 2016-11-14 11:52:14 Converting a TimestampTz into a C# DateTime
Previous Message John R Pierce 2016-11-14 08:50:01 Re: Request to share information regarding deadlock in postgresql-8.1.18