Re: JSON vs. JSONB storage size - Mailing list pgsql-general

From Dmitry Dolgov
Subject Re: JSON vs. JSONB storage size
Date
Msg-id CA+q6zcVvJoBzhPOK9ouy_TgqwDBWcgvedxPVf4G7B4iRq8AAYg@mail.gmail.com
Whole thread Raw
In response to JSON vs. JSONB storage size  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-general
> On Fri, Oct 11, 2019 at 1:40 PM Thomas Kellerer <spam_eater@gmx.net> wrote:
>
> I am a bit surprised by this (not because the jsonb sizes are generally
> bigger, but that the string value takes less space)
>
> Is this caused by the fact that a string value compresses better internally?

Those jsonb objects are quite small, so it could be that an alignment kicks in,
since as far as I remember, jsonb header and data should be aligned by 4 byte
boundary.



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Issues with PAM : log that it failed, whether it actually failed or not
Next
From: Adrian Klaver
Date:
Subject: Re: JSON vs. JSONB storage size