Search Postgresql Archives

Re: stable for each row before insert trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 18, 2019 at 11:18 AM Олег Самойлов <splarv@xxxxx> wrote:
> > STABLE indicates .... (It is inappropriate for AFTER triggers that wish to query rows modified by the current command.)
>
> So, STABLE is inappropriate for such trigger, but is appropriate for BEFORE trigger?
>

Well, a before trigger will not see data changes in any way, so I read
it as "it does not matter for before triggers".
And I would speculate that, being in a trigger, the function is
invoked every time, so there should not be any caching that produces
performance boosts.


> For instance, I expect that the FOR EACH ROW BEFORE trigger marked as STABLE will be faster than VOLATILE without important negative side effects. I observed 3% benefit. IMMUTABLE trigger is slightly slower then STABLE, but I am not sure, too low difference.

It could be faster, but I would not speculate on that rather than an
inling of the code.

Luca






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux