1

I'm running some quite large and expensive queries. After reading a bit on parallel queries, I upgraded my postgres database to 10.4 (fromer was 9.5) and am now able to make use of parallel workers.

The queries I normally run make use of either CREATE TABLE AS or INSERT INTO, because I want to run further queries on the computed results. Now it seems that neither of those components is supporting parallel workers.

I got the hint that I can use \o to output the querie result into a file, then insert the file into my database.

Are there any better options than this?

Kind regards

Ogofo
  • 356
  • 2
  • 6
  • 13
  • 4
    That's pretty much it with Postgres 10. Note that Postgres 11 is currently in beta (target release is Q4/2018) and one of [the improvements there](https://www.postgresql.org/docs/11/static/release-11.html) is "*Parallelized CREATE TABLE .. AS, CREATE MATERIALIZED VIEW, and certain queries using UNION*". –  Jun 05 '18 at 14:03
  • Thanks a lot! I'm looking forwad to the release. Up until then, I will use the current work around. – Ogofo Jun 05 '18 at 14:23

0 Answers0