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

From Heikki Linnakangas
Subject Re: Maintaining cluster order on insert
Date
Msg-id 4674D31B.9050000@enterprisedb.com
Whole thread Raw
In response to Re: Maintaining cluster order on insert  ("Jaime Casanova" <systemguards@gmail.com>)
List pgsql-patches
Jaime Casanova wrote:
> On 5/27/07, Jim C. Nasby <decibel@decibel.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

pgsql-patches by date:

Previous
From: "Simon Riggs"
Date:
Subject: Transaction Guarantee, updated version
Next
From: Heikki Linnakangas
Date:
Subject: Re: Load Distributed Checkpoints, revised patch