Re: jsonb and nested hstore - Mailing list pgsql-hackers

From Greg Stark
Subject Re: jsonb and nested hstore
Date
Msg-id CAM-w4HPwZCtjMr47Z0hH+uTx3ZuiTRhWSBwfiXwfAzBnRtaeTA@mail.gmail.com
Whole thread Raw
In response to Re: jsonb and nested hstore  (Oleg Bartunov <obartunov@gmail.com>)
Responses Re: jsonb and nested hstore  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Fwiw the jsonb data doesn't actually seem to be any smaller than text
json on this data set (this is avg(pg_column_size(col)) and I checked,
they're both using the same amount of toast space)
jsonb | json
-------+-------813.5 | 716.3
(1 row)

It's still more than 7x faster in cpu costs though:

stark=# select count(attrs->'properties'->>'STREET') from citylots;count
--------196507
(1 row)

Time: 1026.678 ms

stark=# select count(attrs->'properties'->>'STREET') from citylots_json;count
--------196507
(1 row)

Time: 7418.010 ms



pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: jsonb and nested hstore
Next
From: Etsuro Fujita
Date:
Subject: Re: inherit support for foreign tables