From: Gregory Stark <stark@enterprisedb.com>
To: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: Dawid Kuroczko <qnex42@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Index Tuple Compression Approach?
Date: Wed, 15 Aug 2007 21:54:17 +0100
Message-ID: <87bqd8y0w6.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <46C3548C.90100@enterprisedb.com>
References: <604pj1n777.fsf_-_@dba2.int.libertyrms.com>
<758d5e7f0708150610j3e6ee948i760d01b91ca29c81@mail.gmail.com>
<758d5e7f0708150939w1a08590aw1abcfcde402122df@mail.gmail.com>
<46C3548C.90100@enterprisedb.com>
"Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> 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.
You kind of want to do avoid both the prefix and the suffix, no?
> It's been discussed before. One big problem is extracting the common
> leading part. You could only do it for text,
Or for multi-column indexes
I could see this being especially useful if you have some columns in the index
key which are small and some that are quite large. So if you have an event
table with an index on <userid,timestamp> you wouldn't have to store lots of
timestamps on the upper level tree nodes. You would only store them for the
leaf nodes.
> but it should be done in a datatype neutral way.
I wonder if there's an analogous operation for other data types though.
Numeric could store the a value relative to the parent value. Arrays could
store only the elements needed. bytea of course works just as well as text (or
better in the face of i18n).
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: stark@enterprisedb.com, heikki@enterprisedb.com, qnex42@gmail.com
Subject: Re: Index Tuple Compression Approach?
In-Reply-To: <87bqd8y0w6.fsf@oxford.xeocode.com>
References: <604pj1n777.fsf_-_@dba2.int.libertyrms.com> <758d5e7f0708150610j3e6ee948i760d01b91ca29c81@mail.gmail.com> <758d5e7f0708150939w1a08590aw1abcfcde402122df@mail.gmail.com> <46C3548C.90100@enterprisedb.com> <87bqd8y0w6.fsf@oxford.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox