On 11/20/21 10:03, Marcos Pegoraro wrote: > > suppress_redundant_updates_trigger was created precisely because it's > not always easy to create application code in such a way that it > generates no redundant updates. However, there is a cost to using it, > and the break even point can be surprisingly high. It should therefore > be used with caution, and after appropriate benchmarks. > > well, there is a cost of not using it too. If lots of things needs to > be done when a record is stored, and if it doesn´t needed to be > stored, all these things will not be done. So, what are pros of > changing a record which did not changed any value and what are cons of > it ? So, I understood the way it works and yes, my point of view is > that this trigger is really needed, for me, obviously.
If you need it then use it. It's been built into postgres since release 8.4. Just be aware that if you use it there is a cost incurred for every record updated whether or not the record is redundant. If only 12% of your updates are redundant I suspect it will be a net loss for you, but as I said above you should benchmark it. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com