Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 6F9129F9E96 for ; Tue, 14 Aug 2007 18:22:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 81246-04 for ; Tue, 14 Aug 2007 18:22:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id D67B79F9513 for ; Tue, 14 Aug 2007 18:22:36 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 56A6331418; Tue, 14 Aug 2007 23:22:34 +0200 (MET DST) From: Chris Browne X-Newsgroups: pgsql.hackers Subject: Index Tuple Compression Approach? Date: Tue, 14 Aug 2007 17:21:16 -0400 Organization: cbbrowne Computing Inc Lines: 35 Message-ID: <604pj1n777.fsf_-_@dba2.int.libertyrms.com> References: <> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.20 (linux) Cancel-Lock: sha1:AQsqbjwfZQyFV50IsgGIvuq2KOk= To: pgsql-hackers@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/447 X-Sequence-Number: 106369 I recently had a chat with someone who was pretty intimate with Adabas for a number of years who's in the process of figuring things out about PostgreSQL. We poked at bits of the respective implementations, seeing some similarities and differences. He pointed out one aspect of index handling that could (in principle) be an interesting optimization. Evidently, in Adabas, index leaf nodes were not simply tuples, but lists where the index value would not be repeated. In PostgreSQL, if you have the index value 'abc', and there are 10 tuples with that value, then you'll have a page full of tuples of the following form: |abc|ptr[rec1]|abc|ptr[rec2]|abc|ptr[rec3]| ...and so forth... Now, the Adabas approach was rather different. It would only have the index value once, and then have the list of tuple pointers: |abc|ptr[rec1],ptr[rec2],ptr[rec3],...[ptr[rec10]| This could allow a fair bit of compression, for cases where the index value is not unique. There is a concommitant downside, that concurrent updates may fight over a page, and, since there would be a higher density, there would be more need to fight over pages. Does this seem pretty much like madness? Or is it a plausible "some day ToDo"? -- "cbbrowne","@","acm.org" http://linuxfinances.info/info/postgresql.html "I don't do drugs anymore 'cause I find I get the same effect just by standing up really fast." -- Jonathan Katz