Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 3F22E9FB67A for ; Fri, 8 Jun 2007 11:20:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 41478-05 for ; Fri, 8 Jun 2007 11:20:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 363749FBFD9 for ; Fri, 8 Jun 2007 11:20:39 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1HwfKO-0001Sm-E2 for pgsql-admin@postgresql.org; Fri, 08 Jun 2007 10:20:36 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 039E03FAF; Fri, 8 Jun 2007 10:20:30 -0400 (EDT) Date: Fri, 8 Jun 2007 10:20:30 -0400 From: Andrew Sullivan To: pgsql-admin@postgresql.org Subject: Re: the right time to vacuum database? Message-ID: <20070608142030.GX17144@phlogiston.dyndns.org> References: <1181039589.643323.59660@r19g2000prf.googlegroups.com> <20070605132546.GI4818@phlogiston.dyndns.org> <1181089690.963738.260660@n15g2000prd.googlegroups.com> <20070606195101.GF11545@phlogiston.dyndns.org> <1181200023.281625.249120@n15g2000prd.googlegroups.com> <20070607174639.GG14087@phlogiston.dyndns.org> <1181309395.707448.201490@i13g2000prf.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1181309395.707448.201490@i13g2000prf.googlegroups.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/83 X-Sequence-Number: 25751 On Fri, Jun 08, 2007 at 06:29:55AM -0700, Charles.Hou wrote: > > i have traced the size of the table. About 1000 new rows will be > inserted into the table in one day. each row has 300 bytes. > 1000*300/1024=293K, but the size of this table had been increased 3MB. > 3MB-293K=2.7MB...Why?where is the 2.7MB? How do you know what the size of the table is? You had at least two tables you were working on before. I think there must be something you're not communicating completely. (And why are you worried about less than 3 Meg anyway? Regular vacuum will leave some empty space around for new data, which means you don't have to go down to the filesystem to make the file bigger before you write it it. This is a Good Thing.) Please go back and run VACUUM VERBOSE on the table you killed the vacuum on before. A -- Andrew Sullivan | ajs@crankycanuck.ca However important originality may be in some fields, restraint and adherence to procedure emerge as the more significant virtues in a great many others. --Alain de Botton