On Thu, Nov 29, 2012 at 9:33 AM, Shaun Thomas <sthomas@xxxxxxxxxxxxxxxx> wrote:
On 11/29/2012 11:28 AM, Mike Christensen wrote: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.
It's always kinda annoyed me that the CLUSTER command in Postgres
doesn't work like it does on Microsoft SQL.
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..