Very Limited Toast Compression on JSONB (9.4 beta 2) - Mailing list pgsql-general

From Larry White
Subject Very Limited Toast Compression on JSONB (9.4 beta 2)
Date
Msg-id CAMdbzVjXJwwEGWHEEVqTqU6d-Ux7af8wZart8RTySFqR5MvPkg@mail.gmail.com
Whole thread Raw
Responses Re: Very Limited Toast Compression on JSONB (9.4 beta 2)  (Adrian Klaver <adrian.klaver@aklaver.com>)
Very Limited Toast Compression on JSONB (9.4 beta 2)  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general
Hi, 

I'm running an experiment on 9.4 beta 2.

I put 275,000 identical JSON files into a table using JSONB (one per row).  Each raw text file is 251K in size, so the total uncompressed is 69GB. The column storage is set to EXTENDED.  There are other toastable columns in the table, but none have more than 36 bytes of data in them.

My Toast table is 66GB. I would have expected to get that much (or more) compression just from JSONB being a binary format.

If I compress one of these JSON files outside of Postgres, it goes from 251K to 1K. So each file should theoretically fit on a single row in the toast table. In total, the amount well under a GB when compressed outside of PG.

Any guesses as to why there is so little compression of this data or how I might remedy the situation?

Thanks much for your help.


Larry



pgsql-general by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: How to implement a uniqueness constraint across multiple tables?
Next
From: Michael Paquier
Date:
Subject: Re: Is it possible to create an index without keeping the indexed data in a column?