public inbox for [email protected]  
help / color / mirror / Atom feed
From: Lok P <[email protected]>
To: David Rowley <[email protected]>
Cc: Guyren Howe <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Design strategy for table with many attributes
Date: Fri, 5 Jul 2024 14:23:17 +0530
Message-ID: <CAKna9Vah53TtUX9qYpDz0hPoAFSLUBqtzriWU=xy8vCWQU+Leg@mail.gmail.com> (raw)
In-Reply-To: <CAApHDvp6FJW0MnchEfis=2ANUTNu4CHVQOcs95=NwTg4SQrxtQ@mail.gmail.com>
References: <CAKna9VbQ=o2Yhjo1EitaxzYpWAXe9vw6QtamzCsNNp2-rQOFSA@mail.gmail.com>
	<CAKFQuwYpai5snt5mEgyXK4m6nR5T6sP-YTYH-GQ0Hs2rXS7uLA@mail.gmail.com>
	<CAKna9VZdihb=n9mNGaCZLKYbWAoS0+knfi_PAfLC5w=Mj5Egig@mail.gmail.com>
	<[email protected]>
	<CAKna9VaNKPR9XruS-yz0qLLgAyik6L-_kGX=C8B682wRSmnn=A@mail.gmail.com>
	<[email protected]>
	<CAKna9VYXKu-1KpV_1X3Jz0iNZ+Uf4WGwYRm62tCQvyp4-L0WCw@mail.gmail.com>
	<CAApHDvp6FJW0MnchEfis=2ANUTNu4CHVQOcs95=NwTg4SQrxtQ@mail.gmail.com>

On Fri, 5 Jul, 2024, 1:44 pm David Rowley, <[email protected]> wrote:

> On Fri, 5 Jul 2024 at 19:53, Lok P <[email protected]> wrote:
> > As David suggested it breaks if a row exceeds the 8k limit I. E a single
> page size , will that still holds true if we have a column with JSON in it?
>
> You wouldn't be at risk of the same tuple length problem if you
> reduced the column count and stored the additional details in JSON.
> Each varlena column is either stored in the tuple inline, or toasted
> and stored out of line. Out of line values need an 18-byte pointer to
> the toasted data. That pointer contributes to the tuple length.
>
>
> David
>

Got it. Thank you very much.

So there would be performance overhead with JSON and we need to validate
that carefully, if at all going in that direction.

However out of curiosity, if the roasted/compressed component or column
which is JSON itself goes beyond 8k post compression, will it break then?


view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Design strategy for table with many attributes
  In-Reply-To: <CAKna9Vah53TtUX9qYpDz0hPoAFSLUBqtzriWU=xy8vCWQU+Leg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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