Re: [GENERAL] Insert performance and disk usage in JSON vs JSONB

Поиск
Список
Период
Сортировка
От Ronny Abraham
Тема Re: [GENERAL] Insert performance and disk usage in JSON vs JSONB
Дата
Msg-id feb55601b7c544819926a5fc27dfd57f@USEPRDEX1.corp.kns.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Insert performance and disk usage in JSON vs JSONB  (Dmitry Dolgov <9erthalion6@gmail.com>)
Список pgsql-general

Thank you, I updated my test to insert 10,000 rows where each row has a JSON or JSONB with 100 keys (I do not have a use case of 1000), here are the results:

 

7. Insert 10,000 rows to JSON (100 items in each row), execution time (sec):

119.411994457

 

 

8. Insert 10,000 rows to JSONB (100 items in each row), execution time (sec):

118.248999119

 

Thanks

Ronny

 

From: Dmitry Dolgov [mailto:9erthalion6@gmail.com]
Sent: Monday, May 15, 2017 3:35 PM
To: Ronny Abraham
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Insert performance and disk usage in JSON vs JSONB

 

On 15 May 2017 at 19:25, Ronny Abraham <rabraham@kns.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).




This email is non-binding, is subject to contract, and neither Kulicke and Soffa Industries, Inc. nor its subsidiaries (each and collectively “K&S”) shall have any obligation to you to consummate the transactions herein or to enter into any agreement, other than in accordance with the terms and conditions of a definitive agreement if and when negotiated, finalized and executed between the parties. This email and all its contents are protected by International and United States copyright laws. Any reproduction or use of all or any part of this email without the express written consent of K&S is prohibited.

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Help: Installing 9.6 breaks local connections to 9.2 on Centos 6.9
Следующее
От: Ken Tanzer
Дата:
Сообщение: Re: [GENERAL] Help: Installing 9.6 breaks local connections to 9.2 onCentos 6.9