TOAST Fields serialisation/deserialization performance

From: Piyush Katariya <corporate(dot)piyush(at)gmail(dot)com>
To: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: TOAST Fields serialisation/deserialization performance
Date: 2023-07-26 12:45:38
Message-ID: CAA5REoVA06P8Et-wKOjCftUUk6kfStOJWbD2kWaoQs_spdszzg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hello Gents,

I have a few queries regarding the TOAST Fields
serialisation/deserialization performance.

The use case i am trying to solve here is to have millions of partitions
and aggregate the data in array field.

I wish to know if i declare certain column in table as "array of UDT/JSONB"
and enable either lz4 or zstd compression on it, does appending or
prepending to that array or even changing the intermediate fields of
UDT/JSONB objects. in that array has a runtime cost of full array data
de-serialization every single time. If i perform any UPDATE operation on
its elements or add/remove new elements from any position, does PG rewrites
the new version of the column value regardless of its size.

Let me know if more inputs are required

--
*Thanks,*
*Piyush Katariya*

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Laurenz Albe 2023-07-26 19:39:25 Re: TOAST Fields serialisation/deserialization performance
Previous Message Andres Freund 2023-07-17 15:34:32 Re: Performance implications of 8K pread()s