Re: Insert performance and disk usage in JSON vs JSONB

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Insert performance and disk usage in JSON vs JSONB
Date: 2017-05-15 20:52:10
Message-ID: ofd4dm$hqu$1@blaine.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ronny Abraham schrieb am 15.05.2017 um 19:25:
> 4. Insert 10,000 rows to JSON, execution time (sec):
>
> 122.855001211
>
> 5. Insert 10,000 rows to JSONB, execution time (sec):
>
> 122.128999233
>
>
> What’s interesting is that inserting to JSONB is slightly faster than inserting to JSON.

A difference in 0.7 seconds from a single test run is not significant enough to warrant the statement "JSONB is slightly faster".

That could very well have been caused by other things going on your system.
Or maybe just some caching of metadata.

Unless you repeat this at least 4 or 5 times, you can't tell if one is really faster then the other.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Patrick B 2017-05-15 23:21:41 union all taking years - PG 9.6
Previous Message Merlin Moncure 2017-05-15 20:52:08 Re: Insert performance and disk usage in JSON vs JSONB