pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gaetano Mendola <mendola@bigfoot.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Equivalent praxis to CLUSTERED INDEX?
Date: Sat, 28 Aug 2004 03:02:47 +0200
Message-ID: <412FD9B7.4080207@bigfoot.com> (raw)
In-Reply-To: <1082.1093630769@sss.pgh.pa.us>
References: <200408271748.i7RHmfJ15766@candle.pha.pa.us>
	<1082.1093630769@sss.pgh.pa.us>

Tom Lane wrote:

 > Bruce Momjian <pgman@candle.pha.pa.us> 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















view thread (41+ messages)  latest in thread

Message-ID: <412FD9B7.4080207@bigfoot.com>
Permalink:  ../412FD9B7.4080207@bigfoot.com/
Also on:    postgresql.org/message-id/412FD9B7.4080207@bigfoot.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mendola@bigfoot.com, tgl@sss.pgh.pa.us
  Subject: Re: Equivalent praxis to CLUSTERED INDEX?
  In-Reply-To: <412FD9B7.4080207@bigfoot.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox