From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Jonah H. Harris <jonah.harris@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-patches@postgresql.org
Subject: Re: Maintaining cluster order on insert
Date: Thu, 10 Aug 2006 09:11:08 +0100
Message-ID: <44DAEA1C.5050509@enterprisedb.com> (raw)
In-Reply-To: <36e682920608091347m4e075a8cv6a04e3c4d97ed6f4@mail.gmail.com>
References: <44DA31B1.3090700@enterprisedb.com>
<28914.1155154622@sss.pgh.pa.us>
<36e682920608091347m4e075a8cv6a04e3c4d97ed6f4@mail.gmail.com>
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
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-hackers@postgresql.org
Cc: heikki@enterprisedb.com, jonah.harris@gmail.com, tgl@sss.pgh.pa.us, pgsql-patches@postgresql.org
Subject: Re: Maintaining cluster order on insert
In-Reply-To: <44DAEA1C.5050509@enterprisedb.com>
* 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