Re: JSONB performance enhancement for 9.6 - Mailing list pgsql-general

From Tom Smith
Subject Re: JSONB performance enhancement for 9.6
Date
Msg-id CAKwSVFE-w53mRGmepWDfM9EPefKL6xqhU-=hZZnjfHSxn1RrYQ@mail.gmail.com
Whole thread Raw
In response to Re: JSONB performance enhancement for 9.6  (Bill Moran <wmoran@potentialtech.com>)
List pgsql-general
Using JSON/JSONB type in postgresql is usually due to the use case that the keys (top  level included) can not be predefined.   this is the major difference between NoSQL/Document and RDBMS.

Why would TOAST have to be used?  Can some speciailly structured "raw" files be used
outside current database files? and jsonb column value would be a pointer to that file.


On Wed, Jan 20, 2016 at 7:32 AM, Bill Moran <wmoran@potentialtech.com> wrote:
On Tue, 19 Jan 2016 23:53:19 -0300
Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

> Bill Moran wrote:
>
> > As far as a current solution: my solution would be to decompose the
> > JSON into an optimized table. I.e.:
> >
> > CREATE TABLE store1 (
> >  id SERIAL PRIMARY KEY,
> >  data JSONB
> > );
> >
> > CREATE TABLE store2 (
> >  id INT NOT NULL REFERENCES store1(id),
> >  top_level_key VARCHAR(1024),
> >  data JSONB,
> >  PRIMARY KEY(top_level_key, id)
> > );
>
> Isn't this what ToroDB already does?
> https://www.8kdata.com/torodb/

Looks like. I wasn't aware of ToroDB, thanks for the link.

--
Bill Moran

pgsql-general by date:

Previous
From: Vitaly Burovoy
Date:
Subject: Re: execute same query only one time?
Next
From: Álvaro Hernández Tortosa
Date:
Subject: Re: JSONB performance enhancement for 9.6