Re: DELETE with LIMIT (or my first hack) - Mailing list pgsql-hackers

From Marti Raudsepp
Subject Re: DELETE with LIMIT (or my first hack)
Date
Msg-id AANLkTimvuT=A1+A_=K6uX-Kt_7kpJEjS25WmLJz3ODeu@mail.gmail.com
Whole thread Raw
In response to Re: DELETE with LIMIT (or my first hack)  (Jaime Casanova <jaime@2ndquadrant.com>)
Responses Re: DELETE with LIMIT (or my first hack)
List pgsql-hackers
On Tue, Nov 30, 2010 at 05:09, Jaime Casanova <jaime@2ndquadrant.com> wrote:
> at least IMHO the only sensible way that LIMIT is usefull is with
> an ORDER BY clause with make the results very well defined...

DELETE with LIMIT is also useful for deleting things in batches, so
you can do large deletes on a live system without starving other users
from I/O. In this case deletion order doesn't matter (it's more
efficient to delete rows in physical table order) -- ORDER BY isn't
necessary.

Regards,
Marti


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: DELETE with LIMIT (or my first hack)
Next
From: Andres Freund
Date:
Subject: Re: profiling connection overhead