Press "Enter" to skip to content

Comparing JSONB to hstore in Postgres

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.