Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL HACKERS <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios...
Date: 2000-07-07 21:56:12
Message-ID: 13864.963006972@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-sql

JanWieck(at)t-online(dot)de (Jan Wieck) writes:
> eisentrp(at)csis(dot)gvsu(dot)edu wrote:
>> Maybe you just want to use zlib. Let other guys hammer out the details.

> We cannot assume that zlib is available everywhere.

We can if we include it in our distribution --- which we could; it's
pretty small and uses a BSD-style license. I can assure you the zlib
guys would be happy with that. And it's certainly as portable as our
own code. The real question is, is a custom compressor enough better
than zlib for our purposes to make it worth taking any patent risks?

We could run zlib at a low compression setting (-z1 to -z3 maybe)
to make compression relatively fast, and since that also doesn't
generate a custom Huffman tree, the overhead in the compressed data
is minor even for short strings. And its memory footprint is
certainly no worse than Jan's method...

The real question is whether zlib decompression is markedly slower
than Jan's code. Certainly Jan's method is a lot simpler and *should*
be faster --- but on the other hand, zlib has had a heck of a lot
of careful performance tuning put into it over the years. The speed
difference might not be as bad as all that.

I think it's worth taking a look at the option.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2000-07-08 00:16:18 Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios...
Previous Message ryan 2000-07-07 21:20:58 Sig 11 bug

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-07-07 23:00:47 Re: fcntl(SETLK) [was Re: 2nd update on TOAST]
Previous Message ryan 2000-07-07 21:30:03 "New" bug?? Serious - crashes backend.

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2000-07-08 00:09:02 Re: Altnerate Column Return Names
Previous Message Jan Wieck 2000-07-07 19:47:10 Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios...