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

From Claudio Freire
Subject Re: jsonb format is pessimal for toast compression
Date
Msg-id CAGTBQpaYrm4S2hvF822CFyUExAg2bnG2AHTrTdn6Jwt1Ry9Qrg@mail.gmail.com
Whole thread Raw
In response to Re: jsonb format is pessimal for toast compression  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
On Mon, Sep 15, 2014 at 2:12 PM, Josh Berkus <josh@agliodbs.com> wrote:
> If not, I think the corner case is so obscure as to be not worth
> optimizing for.  I can't imagine that more than a tiny minority of our
> users are going to have thousands of keys per datum.

Worst case is linear cost scaling vs number of keys, which depends on
the number of keys how expensive it is.

It would have an effect only on uncompressed jsonb, since compressed
jsonb already pays a linear cost for decompression.

I'd suggest testing performance of large small keys in uncompressed
form. It's bound to have a noticeable regression there.

Now, large small keys could be 200 or 2000, or even 20k. I'd guess
several should be tested to find the shape of the curve.



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: B-Tree support function number 3 (strxfrm() optimization)
Next
From: Robert Haas
Date:
Subject: Re: [v9.5] Custom Plan API