John W Higgins <wish...@gmail.com> writes: > Would an answer be to switch the location of the jsonb "header" data to the > end of the field as opposed to the beginning of the field? That would allow > pglz to see what it wants to see early on and go to work when possible?
Hm, might work. Seems a bit odd, but it would make pglz_compress happier. OTOH, the big-picture issue here is that jsonb is generating noncompressible data in the first place. Putting it somewhere else in the Datum doesn't change the fact that we're going to have bloated storage, even if we dodge the early-exit problem. (I suspect the compression disadvantage vs text/plain-json that I showed yesterday is coming largely from that offset array.) But I don't currently see how to avoid that and still preserve the fast binary-search key lookup property, which is surely a nice thing to have. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers