Re: DELETE with LIMIT (or my first hack)

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Cc: Daniel Loureiro <loureirorg(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: DELETE with LIMIT (or my first hack)
Date: 2010-11-30 05:50:55
Message-ID: AANLkTimvuT=A1+A_=K6uX-Kt_7kpJEjS25WmLJz3ODeu@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 30, 2010 at 05:09, Jaime Casanova <jaime(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2010-11-30 07:21:29 Re: profiling connection overhead
Previous Message Robert Haas 2010-11-30 05:05:12 Re: DELETE with LIMIT (or my first hack)