Re: Performance of JSON type in postgres

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Performance of JSON type in postgres
Дата
Msg-id 289f005c-4a80-4098-bf58-f53e06bb7f8c@aklaver.com
обсуждение исходный текст
Ответ на Re: Performance of JSON type in postgres  (veem v <veema0000@gmail.com>)
Ответы Re: Performance of JSON type in postgres
Список pgsql-general
On 7/19/25 13:39, veem v wrote:
> 

> Thank you.
> 
> I tested below for sample data. I see loading or serialization seems a 
> lot slower(twice as slower) in JSONB as compared to JSON. Whereas 
> storage looks efficient in JSONB. and reading performance of nested 
> fields are 7-8 times slower in JSON as compared to JSONB(and ofcourse 
> index support makes it a better choice here). Hope i am testing it 
> correctly here.
> 
> https://dbfiddle.uk/6P7sjL22 <https://dbfiddle.uk/6P7sjL22>
> 
> So I am a bit confused here . Also one of our use case is, along with 
> persisting this data and querying it in postgres database, We are also 
> going to move this data from postgres (which is a upstream OLTP system) 
> to a downstream OLAP system ,which is in Snowflake database which is 
> having data types like Variant or Varchar types. So, will it create a 
> significant difference if we store it in JSON vs JSONB in our postgres 
> i.e the source/upstream database?

I thought you are answered that with your tests above? At least for the 
Postgres end. As to the Snowflake end you will need to do comparable 
tests for fetching the data from Postgres and transforming it.

-- 
Adrian Klaver
adrian.klaver@aklaver.com




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