Hubert Lubaczewski re-creates an issue:
Some time ago I read this blogpost.
They wrote about logging changes to table using a trigger, but one thing that caught my attention was:
Storing only the changed columns made the log five times smaller and the trigger slower.
Figured I can try it myself…
Unfortunately they didn’t provide schema of table, nor test updates. So, let’s make test case:
Click through for the demo, and how a change from JSONB to hstore for changed data improved performance a fair bit.