Re: Compression and on-disk sorting - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Compression and on-disk sorting
Date
Msg-id 24764.1147894254@sss.pgh.pa.us
Whole thread Raw
In response to Re: Compression and on-disk sorting  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> The ideal way to handle the situation you're describing would be to interleave
> the tuples so that you have all 1000 values of the first column, followed by
> all 1000 values of the second column and so on. Then you run a generic
> algorithm on this and it achieves very high compression rates since there are
> a lot of repeating patterns.

It's not obvious to me that that yields a form more compressible than
what we have now.  As long as the previous value is within the lookback
window, an LZ-style compressor will still be able to use it.  More
importantly, the layout you describe would be unable to take advantage
of any cross-column correlation, which in real data is likely to be a
useful property for compression.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Querying libpq compile time options
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Compression and on-disk sorting