| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Terry Laurenzo <tj(at)laurenzo(dot)org> |
| Cc: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP) |
| Date: | 2010-11-21 13:11:18 |
| Message-ID: | AANLkTikUiG5qk9ZVh6Mnh0b8CwKfzQkjHuSd=i=zVc_8@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, Nov 21, 2010 at 12:31 AM, Terry Laurenzo <tj(at)laurenzo(dot)org> wrote:
> What we see from this is that parsing JSON text and generating a binary
> representation is cheap, representing approximately 10% of the base case
> time. Conversely, anything that involves generating JSON text is expensive,
> accounting for 30-40% of the base case time. Some incidental profiling
> shows that while the entire operation is expensive, the process of
> generating string literals dominates this time. There is likely room for
> optimization in this method, but it should be noted that most of these
> documents are lightly escaped (if escaped at all) which represents the happy
> path through the string literal output function.
Ouch! That's kind of painful. But certainly for some use cases it
will work out to a huge speedup, if you're doing subscripting or
similar.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2010-11-21 13:18:10 | Re: Latches with weak memory ordering (Re: max_wal_senders must die) |
| Previous Message | Robert Haas | 2010-11-21 12:53:57 | Re: ALTER OBJECT any_name SET SCHEMA name |