postgresql - Difference between JSON and JSONB in Postgres -


this question has answer here:

what's difference between json , jsonb data type in posgressql?

  1. when should used specific one?
  2. what's benefits or disadvantages respect other?

this explain: https://www.citusdata.com/blog/2016/07/14/choosing-nosql-hstore-json-jsonb/

in cases jsonb want when looking nosql, schema-less, datatype. hstore , json can have place it’s less common. more broadly, jsonb isn’t fit in every data model. can normalize there benefits, if have schema has large number of optional columns (such event data) or schema differs based on tenant id jsonb can great fit. in general want:

jsonb - in cases json - if you’re processing logs, don’t need query, , use more of audit trail hstore - can work fine text based key-value looks, in general jsonb can still work great here 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -