Search Postgresql Archives

Re: "Healing" a table after massive updates

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

 



Brad Nicholson wrote:

> If you want to compact the the table, you either need to use CLUSTER or
> VACUUM FULL + REINDEX.

Actually those are all pretty slow.  If you can do a no-op ALTER TYPE
that rewrites the entire table, it is a lot faster.  Something like

ALTER TABLE tab ALTER COLUMN col TYPE integer;

Assume that column "col" on table "tab" already has type integer.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


[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