Re: Need advice about triggers

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: Need advice about triggers
Дата
Msg-id Pine.LNX.4.33.0309090738230.13569-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Need advice about triggers  ("Mindaugas Riauba" <mind@bi.lt>)
Список pgsql-performance
On Tue, 9 Sep 2003, Mindaugas Riauba wrote:

>
>   Hello,
>
>   I have small table (up to 10000 rows) and every row will be updated
> once per minute. Table also has "before update on each row" trigger
> written in plpgsql. But trigger 99.99% of the time will do nothing
> to the database. It will just compare old and new values in the row
> and those values almost always will be identical.

If the rows aren't going to actually change all that often, perhaps you
could program your trigger to just silently drop the update, i.e. only
change the rows that need updating and ignore the rest?  That should speed
things up.  Unless I'm misunderstanding your needs here.


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

Предыдущее
От: Pailloncy Jean-Gérard
Дата:
Сообщение: Re: slow plan for min/max
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Need advice about triggers