When does CLUSTER occur?

Поиск
Список
Период
Сортировка
От Schnabel, Robert D.
Тема When does CLUSTER occur?
Дата
Msg-id C20A71F48B88EF419C0DC4A55149844628035C@UM-MBX-N03.um.umsystem.edu
обсуждение исходный текст
Ответы Re: When does CLUSTER occur?  (Ryan Kelly <rpkelly22@gmail.com>)
Re: When does CLUSTER occur?  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-general

Hi,

 

I’m looking for some general info on the behavior of CLUSTER.  I add large amounts of data to an existing table something like this:

 

BEGIN;

DROP INDEX IF EXISTS xgen1011_si_sn;

COMMIT;

 

BEGIN;

INSERT INTO gen1011

[snip]

COMMIT;

 

BEGIN;

CREATE INDEX xgen1011_si_sn

  ON gen1011

  USING btree

  (sample_id, snp_number)

  WITH (FILLFACTOR=100)

TABLESPACE index_tablespace;

ALTER TABLE gen1011 CLUSTER ON xgen1011_si_sn;

COMMIT;

 

My question is whether or not the “ALTER TABLE gen1011 CLUSTER ON xgen1011_si_sn” actually clusters the table at that point or if it just tells it to use that index for clustering?  If the latter I assume I need to add a “CLUSTER gen1011 ON xgen1011_si_sn” line at the end along with an ANALYSE line?

 

Thanks,

Bob

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

Предыдущее
От: Peter Kroon
Дата:
Сообщение: set value var via execute
Следующее
От: Ryan Kelly
Дата:
Сообщение: Re: When does CLUSTER occur?