Re: Maintaining cluster order on insert

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Jaime Casanova <systemguards(at)gmail(dot)com>
Cc: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Maintaining cluster order on insert
Date: 2007-06-17 06:22:19
Message-ID: 4674D31B.9050000@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Jaime Casanova wrote:
> On 5/27/07, Jim C. Nasby <decibel(at)decibel(dot)org> wrote:
>> On Mon, May 21, 2007 at 10:48:59AM +0100, Heikki Linnakangas wrote:
>> >
>> > IOW it's working as designed. But maybe it's not the desired behavior.
>> > Should we have a special case and always respect the fillfactor when
>> > inserting to the last page of the heap?
>>
>> I think that would be following with least surprise.
>
> What's the status of this patch? are we waiting an update?
>
> AFAIU, it's not fair to say that the patch maintain cluster order...
> it just try to keep similar rows on the same page if possible (it's
> not the same thing)... if it can't then it simply insert at the last
> page as usual but we have wasted time in the try...

That's right. Or more accurately, if there's no room on the same page,
it uses the FSM and if it still can't find room, it inserts at the last
page.

> so the real question is if there is any performance win on this...
> have you some numbers?

Hmm. I ran a small test with random inserts/deletes back in August. The
conclusion was that the table loses clustering a lot slower, but I can't
find the results now.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-06-17 06:43:43 Re: Load Distributed Checkpoints test results
Previous Message Greg Smith 2007-06-17 05:36:33 Re: Load Distributed Checkpoints test results

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2007-06-17 07:51:35 Re: Load Distributed Checkpoints, revised patch
Previous Message Simon Riggs 2007-06-16 22:17:52 Transaction Guarantee, updated version