Re: Why is writing JSONB faster than just JSON? - Mailing list pgsql-general

From Mitar
Subject Re: Why is writing JSONB faster than just JSON?
Date
Msg-id CAKLmikPP5F1oTRQszeT24V+EWZtM=PgL0wZNF5XG-uSM36dSvw@mail.gmail.com
Whole thread Raw
In response to Re: Why is writing JSONB faster than just JSON?  (Francisco Olarte <folarte@peoplecall.com>)
List pgsql-general
Hi!

On Fri, Apr 23, 2021 at 10:49 AM Francisco Olarte
<folarte@peoplecall.com> wrote:
> Of course, I did not follow the thread to deeply, just pointed that in
> case you were assuming that was not going to be stored compressed.

Thanks for pointing that out. I was just trying to make sure I am
understanding you correctly and that we are all on the same page about
implications. It seems we are.

> Also, not surprised JSONB ends up being fatter,

Yes, by itself this is not surprising. Why I mentioned it is because
in my original post in this thread, I posted that I am surprised that
inserting into JSONB column seems observably faster than into JSON or
TEXT column (for same data) and I wonder why that is. One theory
presented was that JSONB might compress better so there is less IO so
insertion is faster. But JSONB does not look more compressed (I have
not measured the size in my original benchmark), so now I am searching
for other explanations for the results of my benchmark.


Mitar

-- 
http://mitar.tnode.com/
https://twitter.com/mitar_m



pgsql-general by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: Why is writing JSONB faster than just JSON?
Next
From: Eric Hill
Date:
Subject: Re: server process exited with code 1