Re: When does CLUSTER occur?

From: Mike Christensen <mike(at)kitchenpc(dot)com>
To: sthomas(at)optionshouse(dot)com
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, "Schnabel, Robert D(dot)" <schnabelr(at)missouri(dot)edu>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: When does CLUSTER occur?
Date: 2012-11-29 17:43:27
Message-ID: CABs1bs38fjBaqyDo=1vGTys9MY22h+211Cn89n0TMKeCNuJ3Vw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 29, 2012 at 9:33 AM, Shaun Thomas <sthomas(at)optionshouse(dot)com>wrote:

> On 11/29/2012 11:28 AM, Mike Christensen wrote:
>
> It's always kinda annoyed me that the CLUSTER command in Postgres
>> doesn't work like it does on Microsoft SQL.
>>
>
> It's a natural side-effect of MVCC, unfortunately. Data goes wherever it
> goes according to the free space map, or at the end if there are no free
> blocks in the table.
>
> I guess that's one thing rollback segments are good for. In-place
> modifications of data so order can be maintained.
>
>
Yea, in MS SQL, inserts are more expensive with a clustered index because
it has to go move junk around on the heap table..

I've just kinda gotten used to the PG approach, as you can always just
re-cluster if you do some huge insert of a bunch of data. I guess what I'd
be asking for is a feature that would automatically re-cluster whenever new
data was committed, however you could just do that with a trigger I
suppose..

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2012-11-29 18:20:11 Re: When does CLUSTER occur?
Previous Message Schnabel, Robert D. 2012-11-29 17:42:46 Re: When does CLUSTER occur?