Re: PARALLEL CTAS

Shane Borden <sborden76@gmail.com>

From: Shane Borden <sborden76@gmail.com>
To: Rob Sargent <robjsargent@gmail.com>
Cc: pgsql-sql@lists.postgresql.org
Date: 2022-12-12T17:36:11Z
Lists: pgsql-sql
I saw this as an option.  Let’s say you have a million row table.  If you copy from STDIN, do you have to spool the source table to a local file first?  Looking to replace a CTAS thats doing this all within SQL statements now.
---

Thanks,


Shane Borden
sborden76@gmail.com

> On Dec 12, 2022, at 12:25 PM, Rob Sargent <robjsargent@gmail.com> wrote:
> 
> On 12/12/22 10:13, Shane Borden wrote:
>> The issue is there are certain performance benefits to be had by doing parallel CTAS operations and when converting from Oracle to PostgreSQL switching to a “COPY” operation isn’t feasible.
>> ---
>> 
>> Thanks,
>> 
> 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)
> 
> 
>