Re: When does CLUSTER occur?

Поиск
Список
Период
Сортировка
От Mike Christensen
Тема Re: When does CLUSTER occur?
Дата
Msg-id CABs1bs38fjBaqyDo=1vGTys9MY22h+211Cn89n0TMKeCNuJ3Vw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: When does CLUSTER occur?  (Shaun Thomas <sthomas@optionshouse.com>)
Список pgsql-general


On Thu, Nov 29, 2012 at 9:33 AM, Shaun Thomas <sthomas@optionshouse.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..

В списке pgsql-general по дате отправления:

Предыдущее
От: "Schnabel, Robert D."
Дата:
Сообщение: Re: When does CLUSTER occur?
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: When does CLUSTER occur?