Re: Index Tuple Compression Approach?

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Dawid Kuroczko <qnex42(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Index Tuple Compression Approach?
Date: 2007-08-15 19:31:24
Message-ID: 46C3548C.90100@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dawid Kuroczko wrote:
> Some time ago I've had an idea that it might be possible to compress
> th index size, even if it is a unique index. Take the path example.
> My idea would be to to split indexed value to 8-byte chunks.
> For example: /var/lib/postgresql/8.2/main would be split into:
> "/var/lib"
> "/postgre"
> "sql/8.2" -- these would be insertered into a tree as a "scaffold",
> and only vacuum should remove them..
> "main" -- this would be a leaf node. It could be repeated in non-unique
> indexes.

That general approach of storing a common part leading part just once is
called prefix compression. Yeah, it helps a lot on long text fields.
Tree structures like file paths in particular.

It's been discussed before. One big problem is extracting the common
leading part. You could only do it for text, but it should be done in a
datatype neutral way.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zoltan Boszormenyi 2007-08-15 19:35:45 Re: XID wraparound and busy databases
Previous Message Heikki Linnakangas 2007-08-15 19:28:19 Re: XID wraparound and busy databases