X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3CF9C5E46CD for ; Fri, 27 Aug 2004 14:39:39 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 91060-05 for ; Fri, 27 Aug 2004 17:39:33 +0000 (GMT) Received: from mail.autorevenue.com (ip-208.178.167.106.gblx.net [208.178.167.106]) by svr1.postgresql.org (Postfix) with ESMTP id 8BB825E46F9 for ; Fri, 27 Aug 2004 14:39:32 -0300 (ADT) Received: from jeremydunn ([192.168.1.79]) (authenticated) by mail.autorevenue.com (8.11.6/8.11.6) with ESMTP id i7RHdVl07359 for ; Fri, 27 Aug 2004 13:39:31 -0400 Reply-To: From: "Jeremy Dunn" To: Subject: Re: Equivalent praxis to CLUSTERED INDEX? Date: Fri, 27 Aug 2004 13:39:35 -0400 Organization: AutoRevenue Message-ID: <007e01c48c5c$d15f4c60$4f01a8c0@jeremydunn> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <200408271727.i7RHR7Z13191@candle.pha.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/395 X-Sequence-Number: 8031 > -----Original Message----- > From: pgsql-performance-owner@postgresql.org > [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of > Bruce Momjian > Sent: Friday, August 27, 2004 1:27 PM > To: Adi Alurkar > Cc: pgsql-performance@postgresql.org > Subject: Re: [PERFORM] Equivalent praxis to CLUSTERED INDEX? > > > > But what is the advantage of non-full pages in Oracle? > One advantage has to do with updates of variable-length columns, e.g. varchars. If the block is fully packed with data, an update to a varchar column that makes the column wider, causes "row-chaining". This means that a portion of the row is stored in a different data block, which may be somewhere completely different in the storage array. Retrieving that row (or even just that column from that row) as a unit may now require additional disk seek(s). Leaving some space for updates in each data block doesn't prevent this problem completely, but mitigates it to a certain extent. If for instance a row is typically inserted with a null value for a varchar column, but the application developer knows it will almost always get updated with some value later on, then leaving a certain percentage of empty space in each block allocated to that table makes sense. Conversely, if you know that your data is never going to get updated (e.g. a data warehousing application), you might specify to pack the blocks as full as possible. This makes for the most efficient data retrieval performance. - Jeremy