X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id E9781D1D1A4 for ; Thu, 19 Feb 2004 06:52:10 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 35865-09 for ; Thu, 19 Feb 2004 02:52:09 -0400 (AST) Received: from 216.127.68.117 (unknown [216.127.68.117]) by svr1.postgresql.org (Postfix) with SMTP id 3EF2BD1B860 for ; Thu, 19 Feb 2004 02:52:02 -0400 (AST) Received: (qmail 15395 invoked from network); 19 Feb 2004 06:52:07 -0000 Received: from m068-240.nv.iinet.net.au (HELO meerkatsoft.com) (203.217.68.240) by localhost with SMTP; 19 Feb 2004 06:52:07 -0000 Message-ID: <40345D0D.9060103@meerkatsoft.com> Date: Thu, 19 Feb 2004 15:51:57 +0900 From: Alex User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en, ja MIME-Version: 1.0 To: pgsql-general@postgresql.org Subject: VACUUM Question Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/877 X-Sequence-Number: 57588 Hi, just a few questions on the Vaccum I run a vacuum analyze on the database every night as part of a maintenance job. During the day I have a job that loads 30-70,000 records into two tables (each 30-70k). This job runs 2-3 times a day; the first time mainly inserts, the 2nd, 3rd time mostly updates. Both tables have in the area of 1-3Mio records How reasonable is it to run a Vacuum Analyze before and after the insert/update of the data. Also, I noticed that i get quite some performance improvement if I run a count(*) on the two tables before the insert. Any reasons for that? One more question; on one server the Vacuum Analyze before the insert takes approx. 2min after that the same command takes 15min. I run PG7.3.4 Thanks for any help Alex