| From: | Rob Wultsch <wultsch(at)gmail(dot)com> |
|---|---|
| To: | Marti Raudsepp <marti(at)juffo(dot)org> |
| Cc: | Jaime Casanova <jaime(at)2ndquadrant(dot)com>, 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 13:26:37 |
| Message-ID: | AANLkTinuw5XhpMMb6quthPZ99zQmBEr5ew6be7iJ52Z=@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Nov 29, 2010 at 10:50 PM, Marti Raudsepp <marti(at)juffo(dot)org> wrote:
> 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
>
++
I have a lot of DELETE with LIMIT in my (mysql) environment for this reason.
--
Rob Wultsch
wultsch(at)gmail(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Kupershmidt | 2010-11-30 14:07:31 | Re: [GENERAL] column-level update privs + lock table |
| Previous Message | Rob Wultsch | 2010-11-30 13:18:12 | Re: crash-safe visibility map, take three |