public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Steve Midgley <[email protected]>
Cc: Shane Borden <[email protected]>
Cc: Rob Sargent <[email protected]>
Cc: [email protected]
Subject: Re: PARALLEL CTAS
Date: Mon, 12 Dec 2022 13:52:13 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAJexoSLz2dvbVeJHbFnYNTCPbA5qLNrs4W0nPQL1dsPV2nG1xg@mail.gmail.com>
References: <[email protected]>
<CAFcck8HhsTh70ZjQEuvm2kfx0LULJAZR3NZNHvSEX1Y5BaxAMg@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CAJexoSLz2dvbVeJHbFnYNTCPbA5qLNrs4W0nPQL1dsPV2nG1xg@mail.gmail.com>
>> 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
view thread (7+ messages)
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: PARALLEL CTAS
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox