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 AF43B5E3F15 for ; Fri, 27 Aug 2004 22:32:20 -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 26870-09 for ; Sat, 28 Aug 2004 01:32:05 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 85CE05E3631 for ; Fri, 27 Aug 2004 22:32:02 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i7S1W3Lq030595 for ; Sat, 28 Aug 2004 01:32:03 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i7S12uk9023720 for pgsql-performance@postgresql.org; Sat, 28 Aug 2004 01:02:56 GMT From: Gaetano Mendola X-Newsgroups: comp.databases.postgresql.performance Subject: Re: Equivalent praxis to CLUSTERED INDEX? Date: Sat, 28 Aug 2004 03:02:47 +0200 Organization: PYRENET Midi-pyrenees Provider Lines: 51 Message-ID: <412FD9B7.4080207@bigfoot.com> References: <200408271748.i7RHmfJ15766@candle.pha.pa.us> <1082.1093630769@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@pyrenet.fr To: Tom Lane User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en In-Reply-To: <1082.1093630769@sss.pgh.pa.us> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime To: pgsql-performance@postgresql.org 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/406 X-Sequence-Number: 8042 Tom Lane wrote: > Bruce Momjian writes: > >>Agreed. What I am wondering is with our system where every update gets >>a new row, how would this help us? I know we try to keep an update on >>the same row as the original, but is there any significant performance >>benefit to doing that which would offset the compaction advantage? > > > Because Oracle uses overwrite-in-place (undoing from an UNDO log on > transaction abort), while we always write a whole new row, it would take > much larger PCTFREE wastage to get a useful benefit in PG than it does > in Oracle. That wastage translates directly into increased I/O costs, > so I'm a bit dubious that we should assume there is a win to be had here > just because Oracle offers the feature. Mmmm. Consider this scenario: ctid datas (0,1) yyy-xxxxxxxxxxxxxxxxxxx (0,2) -------- EMPTY -------- (0,3) -------- EMPTY -------- (0,4) -------- EMPTY -------- (0,5) -------- EMPTY -------- (0,6) yyy-xxxxxxxxxxxxxxxxxxx (0,7) -------- EMPTY -------- .... -------- EMPTY -------- (0,11) yyy-xxxxxxxxxxxxxxxxxxx the row (0,2) --> (0,5) are space available for the (0,1) updates. This will help a table clustered ( for example ) to mantain his own correct cluster order. Regards Gaetano Mendola