Re: Need help - Regarding Data Compression in PostgreSQL.

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: salma <salma(dot)khanam(at)applabs(dot)com>, pgsql-novice(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: Need help - Regarding Data Compression in PostgreSQL.
Date: 2008-12-19 02:10:57
Message-ID: 20081219021057.GK5447@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Marlowe escribió:
> On Tue, Dec 16, 2008 at 6:52 AM, salma <salma(dot)khanam(at)applabs(dot)com> wrote:

> > 2. What kind of compression, if any, is available in PostgreSQL.
>
> Standard unix compress I believe

No, it's our own LZ implementation, which is focused on speed but does
not compress as well as gzip or compress (see
src/backend/utils/adt/pg_lzcompress.c for more details)

> > 3. If compression is available, what kind of disk space savings can I expect
> > using it.
>
> depends on how compressible your data is. The compression that's
> built into pgsql is focused on speed, not compression. So don't
> expect 99% compression or anything.

Well, you can compress 200 constant bytes to 4 with our algorithm, so
it's 98% :-) (plus the varlena header though)

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Star Liu 2008-12-19 03:19:10 Re: Hi iam the beginner
Previous Message Pedro Doria Meunier 2008-12-19 00:23:36 Re: Hi iam the beginner