Re: Why adding BEFORE TRIGGER affect client CPU?
От | Tom Lane |
---|---|
Тема | Re: Why adding BEFORE TRIGGER affect client CPU? |
Дата | |
Msg-id | 1130.1547838060@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Why adding BEFORE TRIGGER affect client CPU? (Adrian Klaver <adrian.klaver@aklaver.com>) |
Ответы |
Re: Why adding BEFORE TRIGGER affect client CPU?
|
Список | pgsql-general |
Adrian Klaver <adrian.klaver@aklaver.com> writes: > On 1/18/19 10:23 AM, George Woodring wrote: >> We recently changed the process to do a BEFORE TRIGGER to do the >> calculation between OLD and NEW instead of the separate function with >> the SELECT. > So what was the exact change? >> After doing this, CPU on our two client servers went crazy. CPU on the >> database servers look unchanged. Rolling back this change fixed our >> client CPU issue. > What is the client server and what is it doing? Indeed. There's no direct way that messing with a trigger would have caused extra CPU on the client side. I speculate that the trigger caused the data to look different in a way that your client app wasn't expecting, causing it to do something funny --- maybe loop trying to find a matching record, or something like that. Or maybe removing the step that did the calculation client-side had side effects you weren't expecting --- what uses that value client-side, exactly? regards, tom lane
В списке pgsql-general по дате отправления: