Re: SQL spec/implementation question: UPDATE

Поиск
Список
Период
Сортировка
Искать
От
Erik Jones
Тема
Re: SQL spec/implementation question: UPDATE
Дата
Msg-id
001D9701-A345-4DFE-8BEE-5EA03054AA39@myemma.com
Ответ на
Список
Дерево обсуждения
SQL spec/implementation question: UPDATE Kevin Hunter <hunteke@earlham.edu>
Re: SQL spec/implementation question: UPDATE andy <andy@squeakycode.net>
Re: SQL spec/implementation question: UPDATE Tom Lane <tgl@sss.pgh.pa.us>
Re: SQL spec/implementation question: UPDATE Ron Johnson <ron.l.johnson@cox.net>
Re: SQL spec/implementation question: UPDATE Kevin Hunter <hunteke@earlham.edu>
Re: SQL spec/implementation question: UPDATE Tom Lane <tgl@sss.pgh.pa.us>
Re: SQL spec/implementation question: UPDATE "Albe Laurenz" <laurenz.albe@wien.gv.at>
Re: SQL spec/implementation question: UPDATE Nis Jørgensen <nis@superlativ.dk>
Re: SQL spec/implementation question: UPDATE Kevin Hunter <hunteke@earlham.edu>
Re: SQL spec/implementation question: UPDATE Kevin Hunter <hunteke@earlham.edu>
Re: SQL spec/implementation question: UPDATE Alan Hodgson <ahodgson@simkin.ca>
Re: SQL spec/implementation question: UPDATE Erik Jones <erik@myemma.com>

On Oct 22, 2007, at 11:01 AM, Alan Hodgson wrote:

> On Sunday 21 October 2007, Kevin Hunter  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
Дата:
От: Thanesh Gopal
Дата:
FAQ