I have a CTE query returning 750m records, these records need to be inserted into a target table. Using "select * into <> from " clause to parallelize the query part, but is there a way to parallelize the insert part? PostgreSQL version is 11.6.
Would having target table as partitioned help in parallelizing the insert? If so then how to run a CTAS for a partitioned table - lets say hash partitioned table?
CodePudding user response:
There is no way to parallelize INSERTs in PostgreSQL, except by opening several database connections and using them in parallel.