Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p4m5r-0003tC-PA for pgsql-sql@arkaria.postgresql.org; Mon, 12 Dec 2022 16:55:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p4m5q-0006jq-Km for pgsql-sql@arkaria.postgresql.org; Mon, 12 Dec 2022 16:55:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p4m5q-0006jW-9l for pgsql-sql@lists.postgresql.org; Mon, 12 Dec 2022 16:55:54 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p4m5n-0006rO-Or for pgsql-sql@lists.postgresql.org; Mon, 12 Dec 2022 16:55:53 +0000 Received: by mail-pl1-x629.google.com with SMTP id s7so12680353plk.5 for ; Mon, 12 Dec 2022 08:55:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heimdalldata.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=S1FXIim/S5FxpS1r1C9uv7tMjEPSmYUCiDkDPDOUiWI=; b=i2FtsK3VinR/LbkBvqcdfGvFjmkVdYCCv1p7NYss+/w6MazOP2o6bCmOBgJN+X0qEo RLrklm/YdGRIIeg1iBBfmkeR4ANDwW2qqbHx6U/naMNh9pc7nJut2b7SmKBOO9CHk7ef t4gYcr9uWHiz1bNjJc6u2FIJeh7dMbLvuXGgE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=S1FXIim/S5FxpS1r1C9uv7tMjEPSmYUCiDkDPDOUiWI=; b=2eMojMVgqt0af747JBpVlzwSRwgUdht/LKRiZxJTCOYCxgmZwKKQc61w4V7Z3say4J XSbpBixteSPHuhmg70DN9l+l0ir0xZ2vneHnhzAcKox82N6l0QbDvMBCe2P2IQMgHzKs 2EunV3BrQBDl3dhRplt4ok7Bw1SKXyEdcm+C4V47qgFHojsXwOdXpf/00Uqx8bHDxqyI vG3HNrSvjfpRsZyQhGVYD8ey2RrMfhFs+hXliHkoLh4KpEq1kYaEmymnMmKJeGAnkKk6 sGAnIMpOjrcQakO01sTQmROS3rFYpZ6v0egRK9E8pJHmP1iLjuIB8tmv9wO401mULIUV goGQ== X-Gm-Message-State: ANoB5pmC/KpHy8g9lTZSC083SgqUbXEjmIK9ozp6xMo36W8wUOWErnCQ 11+waTSEVjuiKxoh5wriSByjgf+XpW7F7KTpWb5PWmGA/gB1Vg== X-Google-Smtp-Source: AA0mqf5OA62OaYTrzqDQO1Uilsnzk5o9+1jD7YvaUEosDiHWHt9Rbw1PAM4XtjD/et9AbhWD1eFTMDt5VQxEZynesH0= X-Received: by 2002:a17:90a:a887:b0:21a:5df:a5e5 with SMTP id h7-20020a17090aa88700b0021a05dfa5e5mr12219877pjq.151.1670864150590; Mon, 12 Dec 2022 08:55:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Erik Brandsberg Date: Mon, 12 Dec 2022 11:55:39 -0500 Message-ID: Subject: Re: PARALLEL CTAS To: Shane Borden Cc: pgsql-sql@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000002a0c0005efa4603e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002a0c0005efa4603e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Copy operations are by far the most efficient way to do bulk loads. The fdw extension isn't very efficient based on prior experience. On Mon, Dec 12, 2022 at 11:17 AM Shane Borden wrote: > Based on testing thus far, it appears that the only way to get a bulk loa= d > operation (similar to oracle) would be to use the COPY command or to use > multiple connections and break up the inserts across connections. I did > see a possibility of using the postgres_fdw extension and use the batch > functionality, but I haven=E2=80=99t tested that yet. > > Does anyone know the status of this feature / patch that was discussed in > this link? > > > https://www.postgresql.org/message-id/CAJcOf-cXnB5cnMKqWEp2E2z7Mvcd04iLVm= V%3DqpFJrR3AcrTS3g%40mail.gmail.com > > Is there a way in PostgreSQL to parallelize a CTAS statement similar to > how you can do it in Oracle? > > --- > > Thanks, > > > Shane Borden > sborden76@gmail.com > > --0000000000002a0c0005efa4603e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Copy operations are by far the most efficient=C2=A0way to = do bulk loads.=C2=A0 The fdw extension isn't very efficient=C2=A0based = on prior experience.

On Mon, Dec 12, 2022 at 11:17 AM Shane Borden <sborden76@gmail.com> wrote:
Based on tes= ting thus far, it appears that the only way to get a bulk load operation (s= imilar to oracle) would be to use the COPY command or to use multiple conne= ctions and break up the inserts across connections.=C2=A0 I did see a possi= bility of using the postgres_fdw extension and use the batch functionality,= but I haven=E2=80=99t tested that yet.

Does anyon= e know the status of this feature / patch that was discussed in this link?<= /div>


Is there a way in PostgreSQL to parallelize a CTAS statement similar to h= ow you can do it in Oracle?

---

Thanks,


Shane Borden
sborden76@gmail.com

--0000000000002a0c0005efa4603e--