On Wed, Nov 21, 2018 at 9:48 AM Thomas Kellerer <spam_eater@xxxxxxx> wrote: > > Stephen Frost schrieb am 20.11.2018 um 18:28: > > Oh yes, having a dictionary would be a great start to reducing the size > > of the jsonb data, though it could then become a contention point if > > there's a lot of new values being inserted and such. Naturally there > > would also be a cost to pulling that data back out as well but likely it > > would be well worth the benefit of not having to store the field names > > repeatedly. > > There is an extension for a dictionary based JSONB compression: > > https://github.com/postgrespro/zson That was a 'toy' experiment. We did several experiments on jsonb compression and presented the results, for example, http://www.sai.msu.su/~megera/postgres/talks/jsonb-pgconf.us-2017.pdf Also, check this thread on custom compression https://www.postgresql.org/message-id/flat/CAF4Au4xop7FqhCKgabYWymUS0yUk9i%3DbonPnmVUBbpoKsFYnLA%40mail.gmail.com#d01913d3b939b472ea5b38912bf3cbe4 Now, there is YCSB-JSON benchmark available and it is worth to run it for postgres https://dzone.com/articles/ycsb-json-implementation-for-couchbase-and-mongodb We are pretty busy, so you may contribute. For better indexing we are working on parameters for opclasses and I really wanted to have it for PG12. http://www.sai.msu.su/~megera/postgres/talks/opclass_pgcon-2018.pdf My recommendation for testing performance - always run concurrent queries and distibution of queries should be for most cases zipfian (we have added to PG11). > > -- Postgres Professional: http://www.postgrespro.com The Russian Postgres Company