Re: full vacuum of a very large table - Mailing list pgsql-admin

From Plugge, Joe R.
Subject Re: full vacuum of a very large table
Date
Msg-id BD69807DAE0CE44CA00A8338D0FDD08302F6C1D9CE@oma00cexmbx03.corp.westworlds.com
Whole thread Raw
In response to full vacuum of a very large table  ("Nic Chidu" <nic@chidu.net>)
Responses Re: full vacuum of a very large table  (Steve Crawford <scrawford@pinpointresearch.com>)
Re: full vacuum of a very large table  (Shrinivas Devarkonda <shrinivasdevarkonda@gmail.com>)
List pgsql-admin
Personally, provided you have the room, I would build a new table off to the side and then migrate what you need to
keepto the new table, when done, and satisfied that you have all of the candidate rows, ranem the original to table to
"x_tablename"and rename the newly created table into place to take over.... if all is good .. simply drop the
x_tablenametable. 

-----Original Message-----
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Nic Chidu
Sent: Tuesday, March 29, 2011 10:56 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] full vacuum of a very large table

Got a situation where a 130 mil rows (137GB) table needs to be brought down in size to  10 mil records (most recent)
withthe least amount of downtime.  

Doing a full vacuum would be faster on:
 - 120 mil rows deleted and 10 mil active (delete most of them then full vacuum)
 - 10 mil deleted and 120 mil active. (delete small batches and full vacuum after each delete).

Any other suggestions?

Thanks,

Nic

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

pgsql-admin by date:

Previous
From: "Nic Chidu"
Date:
Subject: full vacuum of a very large table
Next
From: raghu ram
Date:
Subject: Re: full vacuum of a very large table