From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
Cc: | Peter Geoghegan <pg(at)heroku(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Teodor Sigaev <teodor(at)sigaev(dot)ru> |
Subject: | Re: jsonb and nested hstore |
Date: | 2014-02-24 17:31:16 |
Message-ID: | 530B81E4.6080206@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 02/24/2014 07:08 AM, Merlin Moncure wrote:
> On Mon, Feb 24, 2014 at 8:46 AM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
>> I still find the phrasing "as jsonb is more efficient for most
>> purposes" to be a bit off Basically, the text json type is faster for
>> serialization/deserialization pattern (not just document preservation)
>> and jsonb is preferred when storing json and doing repeated
>> subdocument accesses.
>
> Hm, I'm going to withdraw that. I had done some testing of simple
> deserialization (cast to text and the like) and noted that jsonb was
> as much as 5x slower. However, I just did some checking on
> json[b]_populate_recordset though and it's pretty much a wash.
Aside from that, I want our docs to make a strong endorsement of using
jsonb over json for most users. jsonb will continue to be developed and
improved in the future; it is very unlikely that json will. Maybe
that's what I should say rather than anything about efficiency.
In other words: having an ambiguous, complex evaluation of json vs.
jsonb does NOT benefit most users. The result will be some users
choosing json and then pitching fit when they want jsonb in 9.5 and have
to rewrite all their tables.
Mind you, we'll need to fix the slow deserialization, though.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-02-24 17:38:15 | Re: Minor performance improvement in transition to external sort |
Previous Message | Dean Rasheed | 2014-02-24 17:28:23 | Re: Row-security on updatable s.b. views |