pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vladimir Ryabtsev <greatvovan@gmail.com>
Cc: ranade@nodalexchange.com
Cc: pgsql-performance@postgresql.org
Subject: Re: SELECT statement returns in 10seconds, but INSERT/CREATE TABLE AS with same SELECT takes 7 minutes
Date: Thu, 27 Sep 2018 16:41:29 -0400
Message-ID: <22616.1538080889@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMqTPq=5KVOSKaxry0PFA8wVQWN8WsdycM=FSy1CUPUuGbDv7w@mail.gmail.com>
References: <CANrrCRxsC3wr711bjAJ4zK_16vF-qQHZXjSJTstbQt9kG5QDSw@mail.gmail.com>
	<24273.1538068894@sss.pgh.pa.us>
	<CAMqTPq=5KVOSKaxry0PFA8wVQWN8WsdycM=FSy1CUPUuGbDv7w@mail.gmail.com>

Vladimir Ryabtsev <greatvovan@gmail.com> writes:
>> The reason for the plan shape difference is probably that the bare SELECT
>> is allowed to use parallelism while INSERT/SELECT isn't.

> In case parallelism is used, should it report in the plan as something like
> "workers planned: N"?

It did --- see the Gather node.

			regards, tom lane




view thread (11+ messages)  latest in thread

Message-ID: <22616.1538080889@sss.pgh.pa.us>
Permalink:  ../22616.1538080889@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22616.1538080889@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, greatvovan@gmail.com, ranade@nodalexchange.com
  Subject: Re: SELECT statement returns in 10seconds, but INSERT/CREATE TABLE AS with same SELECT takes 7 minutes
  In-Reply-To: <22616.1538080889@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox