X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 9D3989FA380 for ; Wed, 13 Sep 2006 13:19:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 33748-09 for ; Wed, 13 Sep 2006 16:19:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 95A399FA374 for ; Wed, 13 Sep 2006 13:19:10 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k8DGJ9iC012739; Wed, 13 Sep 2006 12:19:09 -0400 (EDT) To: Ellen Cyran cc: "pgsql-admin@postgresql.org" Subject: Re: After how many updates should a vacuum be performed? In-reply-to: <45082C83.5040206@urban.csuohio.edu> References: <45082C83.5040206@urban.csuohio.edu> Comments: In-reply-to Ellen Cyran message dated "Wed, 13 Sep 2006 12:06:27 -0400" Date: Wed, 13 Sep 2006 12:19:09 -0400 Message-ID: <12738.1158164349@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200609/110 X-Sequence-Number: 23024 Ellen Cyran writes: > We have a database that periodically we perform large updates, around > a million records, after that the vacuum will run for 12 hours without > completing. After that, I typically remove the 2 indexes and 1 > constraint on the largest table, 7 million records, and the vacuum will > complete in a couple of hours and the indexes can be recreated in a half > hour. By "vacuum" do you mean VACUUM FULL? My advice is not to use that, just plain VACUUM. Don't forget to make sure your FSM is large enough, too. regards, tom lane