HNHacker News
TopNewBestAskShowJobs

magnush

20 karma · joined March 24, 2014

submissionscomments
magnush··on PostgreSQL: Jsonb has committed
Probably the most important difference is that the old JSON types preserves whitespace and attribute ordering, whereas the new one doesn't. If you don't care about those, the old one is also slightly smaller on disk - but I would say not worth it based on the simple fact that you might want to search it in the future some time...
magnush··on PostgreSQL: Jsonb has committed
Another important part about gist is that GIN has much higher overhead for tables that are frequently updated.
magnush··on PostgreSQL: Jsonb has committed
One important difference is that you don't need to extract the values to create an index. E.g. in Mongo I believe you still have to decide which keys to index. A GIN index on top of jsonb in PostgreSQL will make it possible to do an indexed search on any key, not just those that are specified at create index time.
magnush··on PostgreSQL: Jsonb has committed
PostgreSQL jsonb has the same problem in the actual document storage, with repeated keys. I believe it does better in the index, when you use the correct operator, but the table storage has the same type of overhead.
magnush··on PostgreSQL: Jsonb has committed
No, jsonb will still update the whole value when you edit it. For now at least.