Re: Updating a very large table - Mailing list pgsql-admin

From Michael Monnerie
Subject Re: Updating a very large table
Date
Msg-id 200904240721.47480@zmi.at
Whole thread Raw
In response to Re: Updating a very large table  (Rafael Domiciano <rafael.domiciano@gmail.com>)
Responses Re: Updating a very large table  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: Updating a very large table  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-admin
On Freitag 24 April 2009 Rafael Domiciano wrote:
> this table has about 15 indexes...
>
> How good are to Cluster table? Has any criteria to cluster table? How
> can I do it?

http://www.postgresql.org/docs/8.3/interactive/sql-cluster.html
CLUSTER tablename [ USING indexname after which you want data to be
sorted ]

Postgres then rewrites the whole table, which creates a new file on the
disk with the table entries written in the order of the index you chose.
Don't forget the ANALYZE afterwards.

Question: This will not rewrite the indices for that table, right? Then
a REINDEX could be interesting too.

mfg zmi
--
// Michael Monnerie, Ing.BSc    -----      http://it-management.at
// Tel: 0660 / 415 65 31                      .network.your.ideas.
// PGP Key:         "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: AC19 F9D5 36ED CD8A EF38  500E CE14 91F7 1C12 09B4
// Keyserver: wwwkeys.eu.pgp.net                  Key-ID: 1C1209B4


Attachment

pgsql-admin by date:

Previous
From: Rafael Domiciano
Date:
Subject: Re: Updating a very large table
Next
From: Scott Marlowe
Date:
Subject: Re: Updating a very large table