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 1t0ZAQ-00C6Yh-AE for pgsql-general@arkaria.postgresql.org; Tue, 15 Oct 2024 04:28:18 +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 1t0ZAN-002rcg-FZ for pgsql-general@arkaria.postgresql.org; Tue, 15 Oct 2024 04:28:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t0ZAN-002rcY-2A for pgsql-general@lists.postgresql.org; Tue, 15 Oct 2024 04:28:15 +0000 Received: from mail-oo1-xc32.google.com ([2607:f8b0:4864:20::c32]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t0ZAK-0017ch-C6 for pgsql-general@postgresql.org; Tue, 15 Oct 2024 04:28:14 +0000 Received: by mail-oo1-xc32.google.com with SMTP id 006d021491bc7-5e56759e6d7so2670310eaf.3 for ; Mon, 14 Oct 2024 21:28:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728966489; x=1729571289; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=74UkvNEgBVr62m+7DrNaYKUnCwSD73/d2HeZBWAMQBk=; b=dpMVCzOgwdj1+atTqZold50BI5KFeDqFiNnpT8wVmp0cNSduvD5VKCDQF5HbUHif8d 6I2UKiJkDtHEPPYZ0QoTjURXTToXxTnIWzcjneiqroldCP3w9zqUa23EiteGefwXuvQ8 DEOq7UMS6EkLf/y83ln9oGgPiCxqZRqKgdyVzyO8bnaLwBywp52SyTIkQEjLHEFijcSr SOn+57hHuriwnYrCdKaEb4rtejzUecvdZOiI8jjQVnY2X93UfR9Dr+DbTO98Myw5YD2F 50reKB8k0RcwJagIdU8ulCAiEs2hkSCv0SqpuhCJbtWnbjSgpRXWyKEwjqHNWP4OIPCy eJJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728966489; x=1729571289; 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=74UkvNEgBVr62m+7DrNaYKUnCwSD73/d2HeZBWAMQBk=; b=DUcSdr1w4pWfywmW1Ehj3CvQplUvdodk23dTB/u3nYrHgxwYiFo0ZaayiJNXSXZ9J7 GFALP5sVPK6Ik6dLhhYhOuXFpzinGobHHiT+b/rl3SvGXiBicuHtBkpZioI8XP4ZbOws toBmQ8RJEf8QQkJM+noa8ZNAcrwHJ61Izr08B63JzvQ2E0lN8J1GVqL9gjV3nz13jUeQ 5OD37c4x26CTHDAVOQ2E6x9bRY1ueyEf/1IwuuPXXE9P3WCuiHF8olgtlh+RWYr8PcRx J05PMAxsmh/pyZjze/65kKG9rpJtUT5Iq6rUc+WMG5F8LpQf+yvQF/vSbvtSQmXA1LPD h6AQ== X-Gm-Message-State: AOJu0Yzv32YEbVXMiRDB4SxOkee8L1lawZxbbph4ALijz5q+vJS0y4Xk GZh4Sp1bwek54JxEJeKeykX2WPLuFGQTLXhHB3nkY7zgglmhDEmt6QFttBjJGLAtTZ0m6slNp3N iskmMUWLOb8oOeGXwlXklQBmsREkuvIN69w== X-Google-Smtp-Source: AGHT+IEAlp8oxfmbw4wmDGuJZxY2LJ8XnwOkYukVy0Yis3KO1Z6LLYrH1DbZJKWgktTdbmCgnW962q9rzCznIL0D3Hg= X-Received: by 2002:a05:6870:798:b0:287:ce7:7c4a with SMTP id 586e51a60fabf-2886e00f920mr9212980fac.38.1728966489356; Mon, 14 Oct 2024 21:28:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Juan Rodrigo Alejandro Burgos Mella Date: Tue, 15 Oct 2024 01:27:57 -0300 Message-ID: Subject: Re: How to Copy/Load 1 billions rows into a Partition Tables Fast To: "Wong, Kam Fook (TR Technology)" Cc: pgsql-general Content-Type: multipart/alternative; boundary="0000000000006d41d106247c612b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000006d41d106247c612b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Wong On one occasion I had to upload 600 million records, and the most viable and safest option was to generate plans and upload them through a massively parallelized process (because for each process we audited that everything was correct) Atte. JRBM El lun, 14 oct 2024 a las 14:59, Wong, Kam Fook (TR Technology) (< kamfook.wong@thomsonreuters.com>) escribi=C3=B3: > I am trying to copy a table (Postgres) that is close to 1 billion rows > into a Partition table (Postgres) within the same DB. What is the fastes= t > way to copy the data? This table has 37 columns where some of which are > text data types. > > Thank you > Kam Fook Wong > > > This e-mail is for the sole use of the intended recipient and contains > information that may be privileged and/or confidential. If you are not an > intended recipient, please notify the sender by return e-mail and delete > this e-mail and any attachments. Certain required legal entity disclosure= s > can be accessed on our website: > https://www.thomsonreuters.com/en/resources/disclosures.html > --0000000000006d41d106247c612b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0 Wong
On one occasion I had to upload 600 mill= ion records, and the most viable and safest option was to generate plans an= d upload them through a massively parallelized process (because for each pr= ocess we audited that everything was correct)

= Atte.
JRBM

El lun, 14 oct 2024 a las 14:59, Wong, Kam Fook (= TR Technology) (<kamf= ook.wong@thomsonreuters.com>) escribi=C3=B3:

I am trying to copy a= table (Postgres) that is close to 1 billion rows into a Partition table (P= ostgres) within the same DB.=C2=A0 What is the fastest way to copy the data= ?=C2=A0 =C2=A0This table has 37 columns where some of which are text data types.

Thank you
Kam Fook Wong


This e-mail is for the sole use of the intended recipient and contains info= rmation that may be privileged and/or confidential. If you are not an inten= ded recipient, please notify the sender by return e-mail and delete this e-= mail and any attachments. Certain required legal entity disclosures can be accessed on our website: https://www.thomsonreuters.com/en/resources/disclosures.html
--0000000000006d41d106247c612b--