Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group