Re: When does CLUSTER occur?

Поиск
Список
Период
Сортировка
Искать
От
Igor Neyman
Тема
Re: When does CLUSTER occur?
Дата
Msg-id
A76B25F2823E954C9E45E32FA49D70EC08F06967@mail.corp.perceptron.com
Ответ на
Re: When does CLUSTER occur? (Mike Christensen)
Список
Дерево обсуждения
When does CLUSTER occur? "Schnabel, Robert D." <schnabelr@missouri.edu>
Re: When does CLUSTER occur? Ryan Kelly <rpkelly22@gmail.com>
Re: When does CLUSTER occur? Jeff Janes <jeff.janes@gmail.com>
Re: When does CLUSTER occur? "Schnabel, Robert D." <schnabelr@missouri.edu>
Re: When does CLUSTER occur? Mike Christensen <mike@kitchenpc.com>
Re: When does CLUSTER occur? Shaun Thomas <sthomas@optionshouse.com>
Re: When does CLUSTER occur? Mike Christensen <mike@kitchenpc.com>
Re: When does CLUSTER occur? Jeff Janes <jeff.janes@gmail.com>
Re: When does CLUSTER occur? Shaun Thomas <sthomas@optionshouse.com>
Re: When does CLUSTER occur? Mike Christensen <mike@kitchenpc.com>
Re: When does CLUSTER occur? Igor Neyman <ineyman@perceptron.com>
Re: When does CLUSTER occur? Serge Fonville <serge.fonville@gmail.com>
Re: When does CLUSTER occur? Serge Fonville <serge.fonville@gmail.com>

From: Mike Christensen [mailto:mike@kitchenpc.com] 
Sent: Thursday, November 29, 2012 1:35 PM
To: sthomas@optionshouse.com
Cc: Jeff Janes; Schnabel, Robert D.; pgsql-general@postgresql.org
Subject: Re: When does CLUSTER occur?


On Thu, Nov 29, 2012 at 10:28 AM, Shaun Thomas  wrote:
On 11/29/2012 12:20 PM, Jeff Janes wrote:
It would maintain an imperfect clustering, but still much better than
current behavior.

I thought about that, too. The "imperfect clustering" made me erase everything I'd written. If the clustering is imperfect, it's not really clustering. It would mean less random reads to restart the seek chain though, so it would be a perceptible gain. But it's still not real clustering until the order is maintained indefinitely.

So far as I know, that simply can't be done with MVCC. Especially on an insert-only table that's clustered on a column unrelated to insert order.


How is this implemented in MS SQL then?  Obviously, MS SQL supports real clustering and has MVCC..

--

The way MVCC implemented in Postgres (not allowing "in place" updates) is obviously complicates things in regards to clustering.

As for MS SQL, here is how it implements clustering:
The index on which the table is clustered actually becomes a "physical holder" (for the lack of better term) of the table, meaning the complete table tuples are stored in the leaf blocks of the index it is clustered on.  There is no other place in the database where they are stored physically.

Regards,
Igor Neyman

В списке pgsql-general по дате отправления
От: Serge Fonville
Дата:
Сообщение: Re: When does CLUSTER occur?
От: Serge Fonville
Дата:
Сообщение: Re: When does CLUSTER occur?
FAQ