Re: SQL spec/implementation question: UPDATE

Поиск
Список
Период
Сортировка
От Erik Jones
Тема Re: SQL spec/implementation question: UPDATE
Дата
Msg-id 001D9701-A345-4DFE-8BEE-5EA03054AA39@myemma.com
обсуждение исходный текст
Ответ на Re: SQL spec/implementation question: UPDATE  (Alan Hodgson <ahodgson@simkin.ca>)
Список pgsql-general
On Oct 22, 2007, at 11:01 AM, Alan Hodgson wrote:

> On Sunday 21 October 2007, Kevin Hunter <hunteke@earlham.edu> wrote:
>> Heh.  And as Tom points out downthread, that "shortcut" probably
>> doesn't
>> gain anything in the long run.
>
> Considering how expensive updates are in PostgreSQL, I suspect that
> isn't
> true.

No, the idea is that the vast majority of updates aren't going to
have this happen so you're waisting cpu cycles trying to determine
beforehand if the update will have any effect.  The gain from not
running updates that actually wouldn't change any table data would be
dwarfed by the overhead of making that check on every update.

>
> However, the current behaviour does seem to be logical; we did in
> fact ask
> for the row to be updated ...

Right.  And, as someone else pointed out, it also allows any triggers
on the table to still run.

Erik Jones

Software Developer | Emma®
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com



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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: 8.2.3: Server crashes on Windows using Eclipse/Junit
Следующее
От: "Thanesh Gopal"
Дата:
Сообщение: Investigating memory leak of trigger library using valgrind