Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 29BD29F988A for ; Thu, 16 Aug 2007 03:48:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 14018-02 for ; Thu, 16 Aug 2007 03:48:19 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.187]) by postgresql.org (Postfix) with ESMTP id E89EB9F97B2 for ; Thu, 16 Aug 2007 03:48:21 -0300 (ADT) Received: by mu-out-0910.google.com with SMTP id i10so229522mue for ; Wed, 15 Aug 2007 23:48:20 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=Nw+0AZH67QjazdgkHFJVRgGnURO60SdL1vRoWGEZVbbItBV8G9uuVdsAQA7YOR5aZSROvY4Q2q8mHakscqKByt20jKe2wiyKWne1hLo9zjoIaAC3jVbULCAknRpBzqcQEHymd8GcbuX190LaJPhMFDT0j1ZgXEXD2HgtOI4B6EU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=jV3rE3kGCW7K4vEda/yNkIu7p9XF3Fhl2gMuv6QSMBsMhCAlSHvOxlYnS4+tJkHqJlbdJBFcKao2jHXtOW8HLuWRbOvBeYtno747//BAII3ZSpxXfC8R6Zn7VW4R9+tz7gbxksZj4Tgj0iAjB002tb5mapK4a7+jWkpZY015HX0= Received: by 10.86.4.2 with SMTP id 2mr1031080fgd.1187246900493; Wed, 15 Aug 2007 23:48:20 -0700 (PDT) Received: from ?192.168.0.100? ( [80.222.48.97]) by mx.google.com with ESMTPS id c28sm810490fka.2007.08.15.23.48.18 (version=SSLv3 cipher=RC4-MD5); Wed, 15 Aug 2007 23:48:19 -0700 (PDT) Message-ID: <46C3F320.1010809@enterprisedb.com> Date: Thu, 16 Aug 2007 07:48:00 +0100 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: Gregory Stark CC: Dawid Kuroczko , pgsql-hackers@postgresql.org Subject: Re: Index Tuple Compression Approach? References: <604pj1n777.fsf_-_@dba2.int.libertyrms.com><758d5e7f0708150610j3e6ee948i760d01b91ca29c81@mail.gmail.com><758d5e7f0708150939w1a08590aw1abcfcde402122df@mail.gmail.com><46C3548C.90100@enterprisedb.com> <87bqd8y0w6.fsf@oxford.xeocode.com> In-Reply-To: <87bqd8y0w6.fsf@oxford.xeocode.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/554 X-Sequence-Number: 106476 Gregory Stark wrote: > "Heikki Linnakangas" 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? You're much more likely to find common prefixes than suffixes in an index page, because of the ordering. I suppose compressing the suffix would be useful in some cases as well. You might be better off with some generic compression algorithm at that point, though. >> 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 Oh yeah, that you could do more easily. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com