Re: Insert performance and disk usage in JSON vs JSONB

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Ronny Abraham <rabraham(at)kns(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Insert performance and disk usage in JSON vs JSONB
Date: 2017-05-15 19:35:27
Message-ID: CA+q6zcUKhM_tg2Rrw2Y1fZvVsdN0p=QUC2Sr+=RuvYuPm8JYFg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 15 May 2017 at 19:25, Ronny Abraham <rabraham(at)kns(dot)com> wrote:
>
> What’s interesting is that inserting to JSONB is slightly faster than
inserting to JSON.
>
> Maybe that’s because my JSON has a flat structure (no nesting), or maybe
I am doing something else wrong?

I assume it's because your json documents (10 fields) are not big enough.
If you'll try the same tests
with something like 1000 keys for each document, there should be noticeable
difference (at least in my
case it was like that).

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2017-05-15 19:45:40 Re: Coditional join of query using PostgreSQL
Previous Message Nick Dro 2017-05-15 17:52:34 Re: Coditional join of query using PostgreSQL