> -----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