Re: [proposal] de-TOAST'ing using a iterator - Mailing list pgsql-hackers

From Binguo Bao
Subject Re: [proposal] de-TOAST'ing using a iterator
Date
Msg-id CAL-OGktbR09fHEMvHGHGDAWw-fQMoh9BVfY4inkAZbN4ceQqYA@mail.gmail.com
Whole thread Raw
In response to Re: [proposal] de-TOAST'ing using a iterator  (John Naylor <john.naylor@2ndquadrant.com>)
Responses Re: [proposal] de-TOAST'ing using a iterator  (John Naylor <john.naylor@2ndquadrant.com>)
List pgsql-hackers
Hi John!
Sorry for the late reply. It took me some time to fix a random bug.

In the case where we don't know the slice size, how about the other
aspect of my question above: Might it be simpler and less overhead to
decompress entire chunks at a time? If so, I think it would be
enlightening to compare performance.

Good idea. I've tested  your propopal with scripts and patch v5 in the attachment:

                  master          patch v4          patch v5
comp. beg.        4364ms          1505ms          1529ms
comp. end       28321ms        31202ms          26916ms
uncomp. beg.     3474ms          1513ms          1523ms
uncomp. end     27416ms        30260ms          25888ms

The proposal improves suffix query performance greatly
with less calls to the decompression function. 

Besides, do you have any other suggestions for the structure of DetoastIterator or ToastBuffer?
Maybe they can be designed to be more reasonable.

Thanks again for the proposal.
-- 
Best regards,
Binguo Bao
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: sepgsql seems rather thoroughly broken on Fedora 30
Next
From: Bruce Momjian
Date:
Subject: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)