Re: Index Tuple Compression Approach? - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Index Tuple Compression Approach?
Date
Msg-id 46C3548C.90100@enterprisedb.com
Whole thread Raw
In response to Index Tuple Compression Approach?  ("Dawid Kuroczko" <qnex42@gmail.com>)
Responses Re: Index Tuple Compression Approach?  (Gregory Stark <stark@enterprisedb.com>)
List 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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: XID wraparound and busy databases
Next
From: Zoltan Boszormenyi
Date:
Subject: Re: XID wraparound and busy databases