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 1tY4mU-00367M-9y for pgsql-admin@arkaria.postgresql.org; Wed, 15 Jan 2025 14:54:06 +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 1tY4mR-00Ccoe-Pb for pgsql-admin@arkaria.postgresql.org; Wed, 15 Jan 2025 14:54:04 +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 1tY4mR-00CcoV-ES for pgsql-admin@lists.postgresql.org; Wed, 15 Jan 2025 14:54:03 +0000 Received: from mail-oa1-x2b.google.com ([2001:4860:4864:20::2b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tY4mQ-000YCc-1E for pgsql-admin@lists.postgresql.org; Wed, 15 Jan 2025 14:54:02 +0000 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-2a01bcd0143so4319512fac.2 for ; Wed, 15 Jan 2025 06:54:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736952840; x=1737557640; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=rNn/iXeMtyBC7cREt/EAJwmzGUlHDvyBtdZY/Tkr14A=; b=HYTl24x0eufrGHvPeG6R3aIMmSItPOZr2gPKhH5HSWKBeqzEc98QNsYEaTs8CTTO9p CmJcldlDw+CZqtuuVnRSd3YUbO8VqyqpwNp4qai0DfZFgW7/D5glq52rfGqfPep7qQzf 5VryFfsGFakfLWnhuujZ3PdWnlbqpOTW84mX1yKmzIxNxfFrLImySr0snrTaGPnao6NR o3810d7Qf7we1YIDDZlt9hMHtdkpoZCR4DEM2wxeWYzDxXUh9LSND3HUVx5swqy5EfbS TSSe0u7KJtk7UqIGDv5mYyjvbACKE6C6R7ikmInauwI1syE+QkcrS9yJapyswCwAFXs0 nmEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736952840; x=1737557640; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rNn/iXeMtyBC7cREt/EAJwmzGUlHDvyBtdZY/Tkr14A=; b=BHTw7/3IjDJXKvl3yeW772s9+AFMk55D8DOwtfUAWtpxZHt4K0O36+8SsxIv1gRV1g c6mzFaWTUOxyMVVtVQEP6HcyLuRGu300NnEG/f7SKCKavlneoEddCoJK4i2GtdqHO/bK S+RZgVW4cpQsIX4tOOBeQmTikppW97bq7c5MilXirwD0rIvZdaOF9Iu35OgLvDnzZ/TT aqXZHrGUuuA3yBUE481e2Jl5ezJ0uSKhaMMZ2JOMI7z8sHfTkI8FxdDR/Kb1XAShoyWB hWJX0mPAOR/xgdR9txJNhLbduVMlDNT3w/5IjT1zoPVzwMtvC+AN81TQhxewTDCGyxn2 CYoA== X-Gm-Message-State: AOJu0YzOMwAAa3PJSBAuwau3g/f1cw1/6tOSGltFH+L2iRat3mditG8j i44FmfAvpagG7YELWIPEszAdEw1uqU9DvMhd9ELTn4GB9k/QTb7CKmazp7VLMHh5OGusc7JTfVH b/0ZOdRr/+MUnUwwW57ZYq4HWI2J95f9N X-Gm-Gg: ASbGncsaNzgVpJAMrOgZ+9gcnR7VUaQGBQ4YlnWrgpztesEJWqlBe8McLKCgTkk4fb0 adBn0cO+qExIWKVNiQ7JqbIgiThP5Ywdj9bRY19Z+Ufi1lILH6drpqnIHeIIi1P6+XH7qVbc= X-Google-Smtp-Source: AGHT+IHQYAtv6R14aZ6iMFZzHCKZtUrGovTGUCAWPNr1Zo+tHKfi6hxhTgvS2uhAXaHSHcPeZRceW20d3/5h14mRVJM= X-Received: by 2002:a05:6871:80c8:b0:2a7:d856:94a with SMTP id 586e51a60fabf-2aa0673c14emr15493422fac.22.1736952840517; Wed, 15 Jan 2025 06:54:00 -0800 (PST) MIME-Version: 1.0 From: Gambhir Singh Date: Wed, 15 Jan 2025 20:23:01 +0530 X-Gm-Features: AbW1kva_r3Qm5uiOGo4AkENvFR-wM7mLsfNo7oXNK6DCRe-wOd1PeoBq-dp5ai8 Message-ID: Subject: Need an idea to operate massive delete operation on big size table. To: pgsql-admin@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000000cfd47062bbfd9c6" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000000cfd47062bbfd9c6 Content-Type: text/plain; charset="UTF-8" Hi, I received a request from a client to delete duplicate records from a table which is very large in size. Delete queries (~2 Billion) are provided via file, and we have to execute that file in DB. Last time it lasted for two days. I feel there must be another way to delete records in an efficient manner This kind of activity they do every month. -- Thanks & Regards Gambhir Singh --0000000000000cfd47062bbfd9c6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I received a request from a = client to delete duplicate records from a table which is very large in size= .=C2=A0

Delete queries (~2 Billion) are provided via file, and we ha= ve to execute that file in DB. Last time it lasted for two days. I feel the= re must be another way to delete records in an efficient manner
=

This kind o= f activity they do every month.

--
Thanks & Regards
G= ambhir Singh

--0000000000000cfd47062bbfd9c6--