Re: LIMIT for UPDATE and DELETE

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: LIMIT for UPDATE and DELETE
Дата
Msg-id 540ED863.6020402@joh.to
обсуждение исходный текст
Ответ на Re: LIMIT for UPDATE and DELETE  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: LIMIT for UPDATE and DELETE  (Marko Tiikkaja <marko@joh.to>)
Список pgsql-hackers
On 9/9/14 11:57 AM, Heikki Linnakangas wrote:
> What's not clear to me is whether it make sense to do 1) without 2) ? Is
> UPDATE .. LIMIT without support for an ORDER BY useful enough?

I'd say so; I could use it right now.  I have to remove millions of 
lines from a table, but I don't want the live transaction processing to 
take a hit, so I have to do it in batches.  Granted, some kind of rate 
limiting would achieve the same thing for DELETE, but with UPDATE you 
also have to consider row locking, and rate limiting wouldn't help with 
that at all; it would, in fact, just make it worse.  I'll also be 
running a big UPDATE like that later today, so that's two uses today 
alone for me.  And no, these are not routine things so keep your "use 
partitions" suggestions to yourselves.

> And if we
> apply this patch now, how much of it needs to be rewritten after 2) ? If
> the answers are "yes" and "not much", then we should review this patch
> now, and put 2) on the TODO list. Otherwise 2) should do done first.

I'd say "not much, if anything at all".


.marko



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: Escaping from blocked send() reprised.
Следующее
От: Marko Tiikkaja
Дата:
Сообщение: Re: LIMIT for UPDATE and DELETE