Re: jsonb format is pessimal for toast compression

From: Arthur Silva <arthurprs(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Larry White <ljw1001(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
Subject: Re: jsonb format is pessimal for toast compression
Date: 2014-08-27 18:30:22
Message-ID: CAO_YK0U3WStdsua_eqX+Gq3ZfD8-O33qheBjNz6C=u1T4y7yRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 27, 2014 at 1:09 AM, Arthur Silva <arthurprs(at)gmail(dot)com> wrote:

> It won't be faster by any means, but it should definitely be incorporated
> if any format changes are made (like Tom already suggested).
>
> I think it's important we gather at least 2 more things before making any
> calls:
> * Josh tests w/ cache aware patch, which should confirm cache aware is
> indeed prefered
> * Tests with toast hacked to use lz4 instead, which might ease any
> decisions
>
>
> --
> Arthur Silva
>
>
>
> On Wed, Aug 27, 2014 at 12:53 AM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
>
>> On Tue, Aug 26, 2014 at 8:41 PM, Arthur Silva <arthurprs(at)gmail(dot)com>
>> wrote:
>> > The difference is small but I's definitely faster, which makes sense
>> since
>> > cache line misses are probably slightly reduced.
>> > As in the previous runs, I ran the query a dozen times and took the
>> average
>> > after excluding runs with a high deviation.
>>
>> I'm not surprised that it hasn't beaten HEAD. I haven't studied the
>> problem in detail, but I don't think that the "cache awareness" of the
>> new revision is necessarily a distinct advantage.
>>
>> --
>> Peter Geoghegan
>>
>
>
I'm attaching a quick-n-dirty patch that uses lz4 compression instead of
pglz in case someone wants to experiment with it. Seems to work in my test
env, I'll make more tests when I get home.

PS: gotta love gmail fixed defaults of top-posting...

Attachment Content-Type Size
lz4.patch application/octet-stream 69.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2014-08-27 19:07:23 possible optimization: push down aggregates
Previous Message Tom Lane 2014-08-27 18:23:38 Re: Patch to support SEMI and ANTI join removal