Re: PARALLEL CTAS - Mailing list pgsql-sql

From Tom Lane
Subject Re: PARALLEL CTAS
Date
Msg-id 2033540.1670871133@sss.pgh.pa.us
Whole thread Raw
In response to Re: PARALLEL CTAS  (Steve Midgley <science@misuse.org>)
List pgsql-sql
>> Today I suspect you're left with something like the following:
>> - CTAS from source where 1=2 (i.e. table definition via select semantics)
>> - copy from stdin (filled with intended CTAS select)

As far as I can tell, all supported versions of Postgres are perfectly
content to parallelize the source-row computation in a CREATE TABLE AS
SELECT, if they would parallelize the underlying SELECT.  Note that
this is not the same as INSERT INTO ... SELECT, which is a harder
problem because the target table might already have indexes, constraints,
etc.

If what you are concerned about is parallelization of the physical
insertions of the tuples, I'm pretty sure we don't have anything that
can do that today, including COPY.  COPY does have some batch-insertion
optimizations, but that's not parallelism.

Can you parallelize your problem at a higher level, ie do several
table loads at once?

            regards, tom lane



pgsql-sql by date:

Previous
From: Steve Midgley
Date:
Subject: Re: PARALLEL CTAS
Next
From: Shaozhong SHI
Date:
Subject: Tom changed his job role many times