Re: JSON vs. JSONB storage size

2019-10-11 Thread Andrew Gierth
> "Thomas" == Thomas Kellerer writes: Thomas> The table size with jsonb was bigger in general, but the one Thomas> with the "integer" value was even bigger than the one with the Thomas> "string" storage. jsonb stores numeric values as "numeric", not as integers or floats, so the storage n

Re: JSON vs. JSONB storage size

2019-10-11 Thread Adrian Klaver
On 10/11/19 4:40 AM, Thomas Kellerer wrote: I recently stumbled over the presentation "How to Use JSON in MySQL Wrong" by Bill Karwin[1] While most of the indexing part simply doesn't apply to Postgres, I was curious about the statement that the data type of a json value inside the json matter

Re: JSON vs. JSONB storage size

2019-10-11 Thread Dmitry Dolgov
> On Fri, Oct 11, 2019 at 1:40 PM Thomas Kellerer 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

JSON vs. JSONB storage size

2019-10-11 Thread Thomas Kellerer
I recently stumbled over the presentation "How to Use JSON in MySQL Wrong" by Bill Karwin[1] While most of the indexing part simply doesn't apply to Postgres, I was curious about the statement that the data type of a json value inside the json matters as well (Slide 56) Apparently in MySQL sto