Re: Need an idea to operate massive delete operation on big size table.
От
Laurenz Albe
Тема
Re: Need an idea to operate massive delete operation on big size table.
Дата
Msg-id
82cbc03d6bae358db66430f5518abd6b1a683571.camel@cybertec.at
Ответ на
Список
Дерево обсуждения
Need an idea to operate massive delete operation on big size table. Gambhir Singh <gambhir.singh05@gmail.com>
Re: Need an idea to operate massive delete operation on big size table. Laurenz Albe <laurenz.albe@cybertec.at>
Re: Need an idea to operate massive delete operation on big size table. Alex Balashov <abalashov@evaristesys.com>
Re: Need an idea to operate massive delete operation on big size table. Rui DeSousa <rui.desousa@icloud.com>
Re: Need an idea to operate massive delete operation on big size table. Gambhir Singh <gambhir.singh05@gmail.com>
Re: Need an idea to operate massive delete operation on big size table. Ron Johnson <ronljohnsonjr@gmail.com>
Re: Need an idea to operate massive delete operation on big size table. youness bellasri <younessbellasri@gmail.com>
Re: Need an idea to operate massive delete operation on big size table. Ron Johnson <ronljohnsonjr@gmail.com>
Re: Need an idea to operate massive delete operation on big size table. "Day, Joseph" <jday@gisolutions.us>
Re: Need an idea to operate massive delete operation on big size table. youness bellasri <younessbellasri@gmail.com>
Re: Need an idea to operate massive delete operation on big size table. Alex Balashov <abalashov@evaristesys.com>
On Wed, 2025-01-15 at 20:23 +0530, Gambhir Singh wrote: > 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. I don't think there is a better way - except perhaps to create a new copy of the table and copy the surviving rows to the new table. Than may win if you delete a majority of the rows. For the future, you could consider not adding the duplicate rows rather than deleting them. Perhaps a constraint that prevents the duplicates can help. Yours, Laurenz Albe
В списке pgsql-admin по дате отправления
От: Alex Balashov
Дата: