Re: jsonb format is pessimal for toast compression - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: jsonb format is pessimal for toast compression
Date
Msg-id 541892B8.5000009@2ndquadrant.com
Whole thread Raw
In response to Re: jsonb format is pessimal for toast compression  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 16/09/14 21:20, Robert Haas wrote:
> In practice, I'm not very surprised that the impact doesn't seem too
> bad when you're running SQL queries from the client.  There's so much
> other overhead, for de-TOASTing and client communication and even just
> planner and executor costs, that this gets lost in the noise.  But
> think about a PL/pgsql procedure, say, where somebody might loop over
> all of the elements in array.  If those operations go from O(1) to
> O(n), then the loop goes from O(n) to O(n^2).  I will bet you a
> beverage of your choice that somebody will find that behavior within a
> year of release and be dismayed by it.
>

As somebody who did see server melt (quite literally that time 
unfortunately) thanks to the CPU overhead of operations on varlena 
arrays +1 (in fact +many).

Especially if we are trying to promote the json improvements in 9.4 as 
"best of both worlds" kind of thing.

--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: jsonb format is pessimal for toast compression
Next
From: Mingzhe Li
Date:
Subject: New to PostGre SQL asking about write-ahead-log (WAL)