Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1snYmc-004R7U-Of for pgsql-general@arkaria.postgresql.org; Mon, 09 Sep 2024 07:25:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1snYmc-007g90-E0 for pgsql-general@arkaria.postgresql.org; Mon, 09 Sep 2024 07:25:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1snYmb-007g7S-VT for pgsql-general@lists.postgresql.org; Mon, 09 Sep 2024 07:25:58 +0000 Received: from mail-oo1-xc2b.google.com ([2607:f8b0:4864:20::c2b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1snYmZ-000GE1-Ah for pgsql-general@lists.postgresql.org; Mon, 09 Sep 2024 07:25:56 +0000 Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-5e1b50fea4bso1657475eaf.2 for ; Mon, 09 Sep 2024 00:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725866755; x=1726471555; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GHlxchargod2dGMohtICgum5pk/1PjDF62QazQ1rfXg=; b=P4+QFMu0udbJ2ARmvqsI3uvwEUYEjoQrBk5j0O30DdGDj2yIxjLk2fnCT2Gb/A4Nct BJLj4hO9iLZy1PQFf7GG5WE1N0lgbiIVgAPe8/u4dcuK136ZjEtSm7smBRG5LUTK/zLT TIC5c7iFIkk+DUJ3E6d9fvFrGtKcSX0pfdP4G0s6R7EEkifZB0NbtUfLB5S/dK6n8ITj g4p923LHQamh7NQ87j4anKP8t2Gxz6/WB15hLi6Mqxuoq/+fvVk6aFSwJgy6VQJRrkxx h1/yx7j7kUOhlZ5Y3V6LGe2jAamc9bJ4eDWjqlab6POH+mI6lBb/w1ZUanZGjifHxkjk oSQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725866755; x=1726471555; h=content-transfer-encoding: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=GHlxchargod2dGMohtICgum5pk/1PjDF62QazQ1rfXg=; b=AcWVp6bVOaHrww6HQVoYe9U/vg1bR/xw/k+nqvicYogE3BxG7+6E2wHdYGakFMI4XZ Y/mQNgnVQhWlONxe7AUuDrMNaRZQNNC9I5sL6lUNq0xOxSPBsJgWrA+l/u0tD2vq1b7o k4DcmFEk8nfG0zbvMYf9RlsgC1WQMlZTda8Z9m7G7jpNpJcqKhAmgs7W2YiPJf4NdEK7 ArZzX7BknleOD+nC74/TKnf62DEO06Z7opDbRHJRbkWtT6T8TLQkBVOdHnbPNtfjDM0K YRzBRSERL4LpyuI6XWgqXB4EchTsg9eHRDyijjdYzrvd+BaTMGp8zgiYYoOt6YDDZOAA 8spw== X-Gm-Message-State: AOJu0Yy8jR7kxCXI7YS6h8Ak0CCvCfTqhC7duxhFXeCNXog9u176Wn4U rov4qynBvbJAwXQvpiumeRvlV46u+tF1SaNAELPMyhhACNUQaRkZbvfGch87iVISgJDGe5V6ozw rxOGAVc2QL0b4uaKxLEDUoOUcRao= X-Google-Smtp-Source: AGHT+IE6TfkVEMj7vYedpxdCvJukZP7C03RdqkKIKly9aOLskvKf6+k1E6yX7F5CsG0CleyQXFCETuMCtMJcLq0YO48= X-Received: by 2002:a05:6820:1c95:b0:5e1:ce95:9e1f with SMTP id 006d021491bc7-5e1ce959fddmr3113708eaf.2.1725866754732; Mon, 09 Sep 2024 00:25:54 -0700 (PDT) MIME-Version: 1.0 References: <20240908174539.teeanjwrthkjm4ti@hjp.at> <1a34eef6-9b30-46fa-bcc7-d7dc1c0602bb@aklaver.com> In-Reply-To: <1a34eef6-9b30-46fa-bcc7-d7dc1c0602bb@aklaver.com> From: Dominique Devienne Date: Mon, 9 Sep 2024 09:25:43 +0200 Message-ID: Subject: Re: Faster data load To: Adrian Klaver Cc: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Sep 8, 2024 at 8:27=E2=80=AFPM Adrian Klaver wrote: > > simple INSERT ... SELECT was more than twice as fast as 8 parallel COP= Y > > operations (and about 8 times as fast as a single COPY). > > Yeah they seem to have changed a great deal. Though you are correct in > saying COPY is not faster then INSERT..SELECT Interesting. Thanks for sharing. Although to be fair, that adds CSV parsing to the mix, something INSERT-FROM-SELECT does not have to do, skewing the results a little maybe. Comparing against COPY BINARY would be fairer, but less practical I guess. --DD