Adrian Klaver <adrian.klaver@xxxxxxxxxxx> 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