Re: TPC-H Scaling Factors X PostgreSQL Cluster Command

От: Kevin Grittner
Тема: Re: TPC-H Scaling Factors X PostgreSQL Cluster Command
Дата: ,
Msg-id: 462CB3EE.EE98.0025.0@wicourts.gov
(см: обсуждение, исходный текст)
Ответ на: Re: TPC-H Scaling Factors X PostgreSQL Cluster Command  ("Nelson Kotowski")
Список: pgsql-performance

Скрыть дерево обсуждения

TPC-H Scaling Factors X PostgreSQL Cluster Command  ("Nelson Kotowski", )
 Re: TPC-H Scaling Factors X PostgreSQL Cluster Command  (Heikki Linnakangas, )
  Re: TPC-H Scaling Factors X PostgreSQL Cluster Command  ("Nelson Kotowski", )
   Re: TPC-H Scaling Factors X PostgreSQL Cluster Command  ("Kevin Grittner", )
 Re: TPC-H Scaling Factors X PostgreSQL Cluster Command  (Greg Smith, )
  Re: TPC-H Scaling Factors X PostgreSQL Cluster Command  (Heikki Linnakangas, )

>>> On Mon, Apr 23, 2007 at 10:52 AM, in message
<>, "Nelson
Kotowski" <> wrote:
>
>  I don't get how creating only the indexes i cluster on would improve my
> cluster command perfomance. I believed that all other indexes wouldn't
> interfere because so far they're created in a fashionable time and they
> don't refer to any field/column in the orders/lineitem table. Could you
> explain me again?

What a CLUSTER command does is to read through the table in the sequence specified by the index (using the index) and
copythe data into a new copy of the table.  It then applies all of the permissions, constraints, etc. from the original
tableto the copy and builds all the same indexes as were on the original table.  (You can't use the same indexes,
becausethe data is shifted around to new spots.)  The new copy of the table then takes the place of the original.  If
youbuild indexes and then cluster, you throw away the results of the work from the original build, and do it all over
again.

> As for the load, when you say the right order to start, you mean i should
> order the load file by the index field in the table before loading it?

If you load the rows in the same order that the index would read them during the cluster, there is no need to cluster
andno benefit from doing so. 

-Kevin





В списке pgsql-performance по дате сообщения:

От: Mark Kirkwood
Дата:
Сообщение: Re: postgres: 100% CPU utilization
От: Greg Smith
Дата:
Сообщение: Re: TPC-H Scaling Factors X PostgreSQL Cluster Command