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.kla...@aklaver.com



Reply via email to