Re: Performance question

Поиск
Список
Период
Сортировка
От Decibel!
Тема Re: Performance question
Дата
Msg-id 20070816141633.GC54309@nasby.net
обсуждение исходный текст
Ответ на Performance question  ("Marcelo de Moraes Serpa" <celoserpa@gmail.com>)
Список pgsql-general
On Thu, Aug 16, 2007 at 08:52:02AM -0300, Marcelo de Moraes Serpa wrote:
> Hello list,
>
> If I've got a trigger that calls a function each time there is a DELETE or
> UPDATE opration on a table in my system, and in this function I retrieve
> some boolean information from another table and based on this information,
> additional code will be ran or not in this function. Could the solely fact
> of calling the function and selecting the data on another table (and the
> trigger on each update and delete on any table) affect the overall db
> performance in a noticiable manner ?

Of course, you're adding at least one extra query to each UPDATE and
DELETE. Plus the overhead of the trigger itself.

The real question is: so what? If you need that logic to happen, you
need it to happen. Unless you'll be updating or deleting scores of rows
a second, I wouldn't worry too much about it.

Remember the first rule of performance tuning: don't. :)
--
Decibel!, aka Jim Nasby                        decibel@decibel.org
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

Вложения

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

Предыдущее
От: Decibel!
Дата:
Сообщение: Re: how to get id of currently executed query?
Следующее
От: Douglas McNaught
Дата:
Сообщение: Re: SELECT ... FOR UPDATE performance costs? alternatives?