Viva, the NoSQL Postgres !
Oleg Bartunov
Lomonosov Moscow University, Postgres Professional
FOSDEM, Feb 4, 2018, Brussels, Belgium
Viva, the NoSQL Postgres ! Oleg Bartunov Lomonosov Moscow - - PowerPoint PPT Presentation
Viva, the NoSQL Postgres ! Oleg Bartunov Lomonosov Moscow University, Postgres Professional FOSDEM, Feb 4, 2018, Brussels, Belgium Oleg Bartunov M ajor PostgreSQL contributor CEO, Postgres Professional Research scientst at Lomonosov
Oleg Bartunov
Lomonosov Moscow University, Postgres Professional
FOSDEM, Feb 4, 2018, Brussels, Belgium
Since 1995
Oleg Bartunov
Major PostgreSQL contributor
CEO, Postgres Professional
Research scientst at Lomonosov Moscow University
PostgreSQL Forks: OLTP, MPP, OLAP,
CLOUD, GIS, STREAM, TIMESERIES, GPU
Commercial Open Source
Aurora PostgreSQL Enterprise 2002 2006 2010 2012 2014 2004 2008 Aster Data
Terradata
TruCQ
Cisco
Greenplum Enterprise Postgres
Fujtsu
GresCube HadoopDB Hadapt Netezza
IBM
TelegraphCQ ParAccel RedShift
Amazon
PipelineDB Postgres-XC Postgres-XL PowerGres RecDB Vertica
HP
EnterpriseDB Yahoo! Everest 2016 Postgres-X2 Greenplum CitusDB 2017 CitusDB Postgres Pro
2ndQPostgres
AgensGraph TimescaleDB Vitesse DB
Credereum
JSON STANDARD,2008 JSON,2012 HSTORE,2003
JSONB,2014
storage, index support
JSON JSONB
Binary storage, index support Textual storage «as is» A lot of functonality !
JSON_OBJECTAGG, JSON_ARRAYAGG
IS [NOT] JSON, JSON_EXISTS
SELECT JSON_QUERY(js, '$.foor[*^ ? (@.level >1)/.apt[*^ ? (@.area>$iin && @.area < $iax)/.no' PASSING 40 AS min, 90 AS max ) FROM house;
SELECT JSON_QUERY(js, '$.floor[0, 1].apt[1 to last]' WITH WRAPPER) FROM house; ?column?
{"no": 5, "area": 60, "rooms": 2}] (1 row)
SELECT apt.* FROM house, JSON_TABLE(js, '$.floor[0, 1]' COLUMNS ( level int, NESTED PATH '$.apt[1 to last]' COLUMNS ( no int, area int, rooms int ) )) apt; level | no | area | rooms
1 | 2 | 80 | 3 1 | 3 | 50 | 2 2 | 5 | 60 | 2 (3 rows)
CREATE INDEX ON bookmarks USING gin (JSON_QUERY(js, '$.tags.term' WITH WRAPPER) jsonb_path_ops);
CREATE INDEX ON bookmarks USING gin (js jsonb_path_ops(projecton='$.tags[*].term')); Index size: 33Mb vs 292 Mb (full json) It is possible to index several paths: CREATE INDEX ON bookmarks USING gin (js jsonb_path_ops(projecton='$.tags[*].term, $.id, $.links'));
htps://github.com/postgrespro/sqljson
htp://sqlfddle.postgrespro.ru/#"!21/0/1819
htp://standards.iso.org/iက/PubliclyAvailableStandards/c067s367s_ISO_IE C_TR_1907s5-6_2017s.zip
«loooooooooooooooooooooooooong_key1»:1, «veeeeeeeeery_loooooooooooooooooooooooooong_key2»:2
CUSTOM Compression API (PG 11)
equivalent size
sometimes can be even faster than jsonb
level compression methods
for NoSQL databases
(zipfan distributon of queries, high number backends >100)
PERFORMANCE STANDARD HSTORE JSON HSTORE SQL/JSON JSONB SQL/JSON++
2003-2006 2012 2014 SQL 2016 support Jsonb compression subscriptng syntax 2019 ? 2018 Custom types support smart indexing update, delete
(zipfan distributon of queries, high number backends >100)