Re: jsonb format is pessimal for toast compression

Поиск
Список
Период
Сортировка
Искать
От
Josh Berkus
Тема
Re: jsonb format is pessimal for toast compression
Дата
Msg-id
53F3F913.9030803@agliodbs.com
Список
Дерево обсуждения
jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Stephen Frost <sfrost@snowman.net>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Bruce Momjian <bruce@momjian.us>
Re: jsonb format is pessimal for toast compression Stephen Frost <sfrost@snowman.net>
Re: jsonb format is pessimal for toast compression Bruce Momjian <bruce@momjian.us>
Re: jsonb format is pessimal for toast compression Stephen Frost <sfrost@snowman.net>
Re: jsonb format is pessimal for toast compression Stephen Frost <sfrost@snowman.net>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Stephen Frost <sfrost@snowman.net>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Kevin Grittner <kgrittn@ymail.com>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Robert Haas <robertmhaas@gmail.com>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Stephen Frost <sfrost@snowman.net>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Robert Haas <robertmhaas@gmail.com>
Re: jsonb format is pessimal for toast compression Jan Wieck <jan@wi3ck.info>
Re: jsonb format is pessimal for toast compression Peter Geoghegan <pg@heroku.com>
Re: jsonb format is pessimal for toast compression Stephen Frost <sfrost@snowman.net>
Re: jsonb format is pessimal for toast compression Peter Geoghegan <pg@heroku.com>
Re: jsonb format is pessimal for toast compression Bruce Momjian <bruce@momjian.us>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Bruce Momjian <bruce@momjian.us>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Bruce Momjian <bruce@momjian.us>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Bruce Momjian <bruce@momjian.us>
Re: jsonb format is pessimal for toast compression Oleg Bartunov <obartunov@gmail.com>
Re: jsonb format is pessimal for toast compression Larry White <ljw1001@gmail.com>
Re: jsonb format is pessimal for toast compression Claudio Freire <klaussfreire@gmail.com>
Re: jsonb format is pessimal for toast compression Claudio Freire <klaussfreire@gmail.com>
Re: jsonb format is pessimal for toast compression Peter Geoghegan <pg@heroku.com>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Gavin Flower <GavinFlower@archidevsys.co.nz>
Re: jsonb format is pessimal for toast compression Merlin Moncure <mmoncure@gmail.com>
Re: jsonb format is pessimal for toast compression Andrew Dunstan <andrew@dunslane.net>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Heikki Linnakangas <hlinnakangas@vmware.com>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Claudio Freire <klaussfreire@gmail.com>
Re: jsonb format is pessimal for toast compression Stephen Frost <sfrost@snowman.net>
Re: jsonb format is pessimal for toast compression Andrew Dunstan <andrew@dunslane.net>
Re: jsonb format is pessimal for toast compression Amit Kapila <amit.kapila16@gmail.com>
Re: jsonb format is pessimal for toast compression David G Johnston <david.g.johnston@gmail.com>
Re: jsonb format is pessimal for toast compression John W Higgins <wishdev@gmail.com>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Andrew Dunstan <andrew@dunslane.net>
Re: jsonb format is pessimal for toast compression Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: jsonb format is pessimal for toast compression Andrew Dunstan <andrew@dunslane.net>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Andrew Dunstan <andrew@dunslane.net>
Re: jsonb format is pessimal for toast compression Tom Lane <tgl@sss.pgh.pa.us>
Re: jsonb format is pessimal for toast compression Andrew Dunstan <andrew@dunslane.net>
Re: jsonb format is pessimal for toast compression Ants Aasma <ants@cybertec.at>
Re: jsonb format is pessimal for toast compression Peter Geoghegan <pg@heroku.com>
Re: jsonb format is pessimal for toast compression Jan Wieck <jan@wi3ck.info>
Re: jsonb format is pessimal for toast compression "David E. Wheeler" <david@justatheory.com>
Re: jsonb format is pessimal for toast compression Jan Wieck <jan@wi3ck.info>
Re: jsonb format is pessimal for toast compression Teodor Sigaev <teodor@sigaev.ru>
Re: jsonb format is pessimal for toast compression Teodor Sigaev <teodor@sigaev.ru>
Re: jsonb format is pessimal for toast compression Alexander Korotkov <aekorotkov@gmail.com>
Re: jsonb format is pessimal for toast compression Hannu Krosing <hannu@2ndQuadrant.com>
Re: jsonb format is pessimal for toast compression Marti Raudsepp <marti@juffo.org>
Re: jsonb format is pessimal for toast compression Larry White <ljw1001@gmail.com>
On 08/15/2014 04:19 PM, Tom Lane wrote:
> Personally I'd prefer to go to the all-lengths approach, but a large
> part of that comes from a subjective assessment that the hybrid approach
> is too messy.  Others might well disagree.
> 
> In case anyone else wants to do measurements on some more data sets,
> attached is a copy of Heikki's patch updated to apply against git tip.

Note that this is not 100% comparable because I'm running it against git
clone, and the earlier tests were against beta2.  However, the Heikki
patch looks like a bust on this dataset -- see below.

postgres=# select pg_size_pretty(pg_total_relation_size('jsonic'));pg_size_pretty
----------------394 MB
(1 row)

postgres=# select pg_size_pretty(pg_total_relation_size('jsonbish'));
pg_size_pretty
----------------542 MB

Extraction Test:

postgres=# explain analyze select row_to_json -> 'kt1_total_sum' from
jsonbish where row_to_json @> '{ "rpt_per_dt" : "2003-06-30" }';                                                               QUERY
PLAN
-------------------------------------------------------------------------------------------------------------------------------------------Bitmap Heap Scan on jsonbish  (cost=29.55..582.92 rows=200 width=18)
(actual time=22.742..5281.823 rows=100423 loops=1)  Recheck Cond: (row_to_json @> '{"rpt_per_dt": "2003-06-30"}'::jsonb)  Heap Blocks: exact=1471  ->  Bitmap Index Scan on jsonbish_row_to_json_idx  (cost=0.00..29.50
rows=200 width=0) (actual time=22.445..22.445 rows=100423 loops=1)        Index Cond: (row_to_json @> '{"rpt_per_dt": "2003-06-30"}'::jsonb)Planning time: 0.095 msExecution time: 5292.047 ms
(7 rows)

So, that extraction test is about 1% *slower* than the basic Tom Lane
lengths-only patch, and still 80% slower than original JSONB.  And it's
the same size as the lengths-only version.

Huh?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата:
От: Noah Misch
Дата:
FAQ