On Sun, Nov 21, 2010 at 12:31 AM, Terry Laurenzo <t...@laurenzo.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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to