Re: Maintaining cluster order on insert

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: Maintaining cluster order on insert
Date: 2006-08-10 08:11:08
Message-ID: 44DAEA1C.5050509@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Jonah H. Harris wrote:
> On 8/9/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2006-08-10 08:23:39 Re: [PATCHES] Maintaining cluster order on insert
Previous Message Lukas Smith 2006-08-10 07:17:00 Re: 8.2 features status

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2006-08-10 08:23:39 Re: [PATCHES] Maintaining cluster order on insert
Previous Message Simon Riggs 2006-08-10 06:45:23 Re: Plugins redux (was Re: [PATCHES] PL instrumentation