Re: Maintaining cluster order on insert - Mailing list pgsql-patches

From Heikki Linnakangas
Subject Re: Maintaining cluster order on insert
Date
Msg-id 44DAEA1C.5050509@enterprisedb.com
Whole thread Raw
In response to Re: Maintaining cluster order on insert  ("Jonah H. Harris" <jonah.harris@gmail.com>)
List pgsql-patches
Jonah H. Harris wrote:
> On 8/9/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> UPDATE tries to place the new tuple on the same page it's already
>> on.
>
> I think he meant for INSERT.
>

Right. Update is indeed taken care of already.

One example where this would help would be a customer_history table that
stores all transactions of a customer. Primary key is (customer_id,
transaction_id). You would want to keep the table clustered by
customer_id to make it quick to retrieve all transactions of a customer.
In general, any table with more or less random insert/delete activity
that you want to keep in order would benefit.

- Heikki


pgsql-patches by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Forcing current WAL file to be archived
Next
From: Tom Lane
Date:
Subject: Re: Forcing current WAL file to be archived