Re: Bulk processing & deletion - Mailing list pgsql-general

From Alexander Pyhalov
Subject Re: Bulk processing & deletion
Date
Msg-id 4E96E892.6020000@rsu.ru
Whole thread Raw
In response to Bulk processing & deletion  (Ivan Voras <ivoras@freebsd.org>)
List pgsql-general
On 10/13/2011 16:20, Ivan Voras wrote:
> Hello,
>
> I have a table with a large number of records (millions), on which the
> following should be performed:
>
>     1. Retrieve a set of records by a SELECT query with a WHERE condition
>     2. Process these in the application
>     3. Delete them from the table
>
Hello.
Maybe you can just do begin; delete from ..... WHERE ... RETURNING *;,
process records and issue COMMIT after processing?


--
Best regards,
Alexander Pyhalov,
system administrator of Computer Center of Southern Federal University

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: pg 8.3 replication causing corruption
Next
From: Alexander Farber
Date:
Subject: Slow query: select * order by XXX desc offset 10 limit 10