| From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> | 
|---|---|
| To: | Bill Moran <wmoran(at)potentialtech(dot)com> | 
| Cc: | Tom Smith <tomsmith1989sk(at)gmail(dot)com>, Thomas Kellerer <spam_eater(at)gmx(dot)net>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>, Álvaro Hernández Tortosa <aht(at)8Kdata(dot)com> | 
| Subject: | Re: JSONB performance enhancement for 9.6 | 
| Date: | 2016-01-20 02:53:19 | 
| Message-ID: | 20160120025319.GA281674@alvherre.pgsql | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
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/
-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2016-01-20 03:06:10 | Re: Recurring and non recurring events. | 
| Previous Message | Bruce Momjian | 2016-01-20 01:51:33 | Re: JSONB performance enhancement for 9.6 |