pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Understanding JSONB and TOAST tables
2+ messages / 2 participants
[nested] [flat]

* Understanding JSONB and TOAST tables
@ 2020-06-09 19:48 Wells Oliver <wells.oliver@gmail.com>
  2020-06-09 22:59 ` Re: Understanding JSONB and TOAST tables Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Wells Oliver @ 2020-06-09 19:48 UTC (permalink / raw)
  To: pgsql-admin

Is there documentation that lays out how JSONB columns are stored? I have a
Rather Large Table with 37m+ rows with large JSONB objects, its size is
about 300mb, but there's an associated TOAST table with a 28GB size.

Curious how/why PSQL would store JSONB stuff this way.

Thanks!

-- 
Wells Oliver
wells.oliver@gmail.com <wellsoliver@gmail.com>

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Understanding JSONB and TOAST tables
  2020-06-09 19:48 Understanding JSONB and TOAST tables Wells Oliver <wells.oliver@gmail.com>
@ 2020-06-09 22:59 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2020-06-09 22:59 UTC (permalink / raw)
  To: Wells Oliver <wells.oliver@gmail.com>; pgsql-admin

On 2020-06-09 21:48, Wells Oliver wrote:
> Is there documentation that lays out how JSONB columns are stored? I 
> have a Rather Large Table with 37m+ rows with large JSONB objects, its 
> size is about 300mb, but there's an associated TOAST table with a 28GB size.
> 
> Curious how/why PSQL would store JSONB stuff this way.

TOAST is documented here: 
https://www.postgresql.org/docs/current/storage-toast.html.  JSONB is 
handled like any other (variable-size) data type.  You can use the 
per-column storage settings mentioned on that page to perhaps achieve 
different storage outcomes.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-06-09 22:59 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 19:48 Understanding JSONB and TOAST tables Wells Oliver <wells.oliver@gmail.com>
2020-06-09 22:59 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox