From: Jeremy Dunn <jdunn@autorevenue.com>
To: pgsql-performance@postgresql.org
Subject: Re: Equivalent praxis to CLUSTERED INDEX?
Date: Fri, 27 Aug 2004 13:39:35 -0400
Message-ID: <007e01c48c5c$d15f4c60$4f01a8c0@jeremydunn> (raw)
In-Reply-To: <200408271727.i7RHR7Z13191@candle.pha.pa.us>
> -----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
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: jdunn@autorevenue.com
Subject: Re: Equivalent praxis to CLUSTERED INDEX?
In-Reply-To: <007e01c48c5c$d15f4c60$4f01a8c0@jeremydunn>
* 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