Search Postgresql Archives

Re: "vacuum" and "cluster"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jimmy Choi wrote:
Hello,

Does running "cluster" remove the need to run "vacuum"?

My understanding is that `CLUSTER' creates a new table file, then swaps it out for the old one.

http://www.postgresql.org/docs/8.3/static/sql-cluster.html

" During the cluster operation, a temporary copy of the table is created that contains the table data in the index order. Temporary copies of each index on the table are created as well. Therefore, you need free space on disk at least equal to the sum of the table size and the index sizes. "

It's not stated explicitly, but I'm pretty sure discussion here has mentioned that too. Given that, VACUUM FULL on a just-CLUSTERed table should be redundant.

The easy way to be sure is to use ANALYZE VERBOSE to examine the dead row counts etc before and after each operation.

--
Craig Ringer


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux