Re: TOAST : partial detoasting : only a small part of a toasted value (for pgpointcloud)

From: Rémi Cura <remi(dot)cura(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: TOAST : partial detoasting : only a small part of a toasted value (for pgpointcloud)
Date: 2018-11-14 18:47:38
Message-ID: CAJvUf_ub+JQkDNEaR8DbSdzC6_QZ64egyOLSN2JeT_cJPmT81Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

wow,
it was right under my nose.
Thank you very much !
Cheers,
Remi-C

Le mar. 13 nov. 2018 à 19:00, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> a écrit :

> =?UTF-8?Q?R=C3=A9mi_Cura?= <remi(dot)cura(at)gmail(dot)com> writes:
> > So the pgpointcloud store sometimes very large groups of points into one
> > row (TOASTED), something along few kB to few MB. TOAST would be in
> EXTERNAL
> > mode (no compression).
> > Sometimes we only want to access a part of this data (one or several
> blocks
> > within the full data).
> >> From what I understand, for the moment it requires to fetch all the
> data
> > from disk, then de-toast it, then select only the part of the data we are
> > interested in.
>
> > Yet I think it is possible to detoast only a subset of the data (and thus
> > fetch only some part of the data), considering that the [doc on toast](
> > https://www.postgresql.org/docs/11/storage-toast.html) says
> >> " Use of EXTERNAL will make substring operations on wide text and bytea
> > columns faster
> >> (at the penalty of increased storage space) because these operations are
> > optimized
> >> to fetch only the required parts of the out-of-line value when it is not
> > compressed. "
>
> > So my question is how does it work, how easy would it be to implement for
> > pgpointcloud?
>
> See PG_DETOAST_DATUM_SLICE and users of that macro.
>
> regards, tom lane
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nicolas Paris 2018-11-14 19:11:00 Re: Default Privilege Table ANY ROLE
Previous Message Adrian Klaver 2018-11-14 17:28:42 Re: Java UnsatisfiedLinkError exception when connecting to Postgresql database