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 0683B5E46E7 for ; Fri, 27 Aug 2004 23:08:27 -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 80302-06 for ; Sat, 28 Aug 2004 02:08:19 +0000 (GMT) Received: from pns.mm.eutelsat.org (pns.mm.eutelsat.org [194.214.173.227]) by svr1.postgresql.org (Postfix) with ESMTP id 88C7C5E40BA for ; Fri, 27 Aug 2004 23:08:16 -0300 (ADT) Received: from nts-03.mm.eutelsat.org (localhost [127.0.0.1]) by pns.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i7S27Ql09976; Sat, 28 Aug 2004 04:07:27 +0200 Received: from [127.0.0.1] (accesspoint.mm.eutelsat.org [194.214.173.4]) by nts-03.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i7S28HV24925; Sat, 28 Aug 2004 04:08:17 +0200 Message-ID: <412FE901.3070707@bigfoot.com> Date: Sat, 28 Aug 2004 04:08:01 +0200 From: Gaetano Mendola User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruce Momjian Cc: Tom Lane , "pgsql-performance@postgresql.org" Subject: Re: Equivalent praxis to CLUSTERED INDEX? References: <200408280146.i7S1kmB19226@candle.pha.pa.us> In-Reply-To: <200408280146.i7S1kmB19226@candle.pha.pa.us> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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/407 X-Sequence-Number: 8043 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bruce Momjian wrote: | Gaetano Mendola wrote: | |>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. | | | Right. My point was that non-full fill is valuable for us only when | doing clustering, while for Oracle it is a win even in non-cluster cases | because of the way they update in place. Don't you think this will permit also to avoid extra disk seek and cache invalidation? If you are updating the row (0,1) I think is less expensive put the new version in (0,2) instead of thousand line far from that point. Regards Gaetano Mendola -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBL+kA7UpzwH2SGd4RAp6fAJ9rSs5xmTXsy4acUGcnCRTbEUCwrwCgo/o6 0JPtziuf1E/EGLaqjbPMV44= =pIgX -----END PGP SIGNATURE-----