Re: When does CLUSTER occur?

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: When does CLUSTER occur?
Дата
Msg-id CAMkU=1zB9m66uc7khjppKQeTbcsHhR_CGOOMFVvhsxMP0qNfHw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: When does CLUSTER occur?  (Shaun Thomas <sthomas@optionshouse.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 think the two things are pretty much orthogonal.  MVCC might
complicate the coding for maintaining clustering (either a little or
lot, depending the approach) but surely doesn't forbid it.

It should be relatively easy, when inserting a new tuple, to first try
blocks which have "nearby" tuples to see if they have room, before
falling back on normal fsm or extension.  It would maintain an
imperfect clustering, but still much better than current behavior.

Cheers,

Jeff


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

Предыдущее
От: Mike Christensen
Дата:
Сообщение: Re: When does CLUSTER occur?
Следующее
От: Shaun Thomas
Дата:
Сообщение: Re: When does CLUSTER occur?