X-Original-To: pgsql-admin@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id D590B92570A for ; Thu, 22 May 2003 10:57:45 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 54188-02 for ; Thu, 22 May 2003 10:57:13 -0400 (EDT) Received: from ecbull20.frec.bull.fr (ecbull20.frec.bull.fr [129.183.4.3]) by developer.postgresql.org (Postfix) with ESMTP id 78B89926062 for ; Thu, 22 May 2003 07:45:40 -0400 (EDT) Received: from ecn002.frec.bull.fr (ecn002.frec.bull.fr [129.183.4.6]) by ecbull20.frec.bull.fr (8.9.2/8.9.1) with ESMTP id NAA16110; Thu, 22 May 2003 13:45:21 +0200 Received: from BULL.NET ([129.183.148.134]) by ecn002.frec.bull.fr (Lotus Domino Release 5.0.12) with ESMTP id 2003052213444085:98 ; Thu, 22 May 2003 13:44:40 +0200 Message-ID: <3ECCB856.C3DB2926@BULL.NET> Date: Thu, 22 May 2003 13:45:26 +0200 From: Thierry Missimilly Organization: BSIS/R&D X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: fr,en MIME-Version: 1.0 To: "Eugene M. Zheganin" Cc: pgsql-admin@postgresql.org Subject: Re: Full vacuuming of BIG tables takes too long References: <54953117843.20030522103956@norma.perm.ru> X-MIMETrack: Itemize by SMTP Server on ECN002/FR/BULL(Release 5.0.12 |February 13, 2003) at 22/05/2003 13:44:40, Serialize by Router on ECN002/FR/BULL(Release 5.0.12 |February 13, 2003) at 22/05/2003 13:44:48, Serialize complete at 22/05/2003 13:44:48 Content-Type: multipart/mixed; boundary="------------9AECE8AE5D08F104185BF524" X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/301 X-Sequence-Number: 8863 This is a multi-part message in MIME format. --------------9AECE8AE5D08F104185BF524 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I don't have a solution but : 1) Is your system spending time in Wait I/O, while vacuum analyze is running ? Perhaps, you can save time by incrising I/O throughput. 2) In the alternative dump/recreate/restore, do you recreate the Foreign Key ? This step takes long time (depending of your Database schema). I have try this scenario : Dump data / Drop Foreign Key / Truuncate Tables / restore / Recreate the Foreign Key The step Recreate FK takes 2 times the four first steps. Thierry "Eugene M. Zheganin" wrote: > Hi, all. > > Just example. I have an table in ISP billing base, which every 2 > months grows and contains up to 35,000,000 of records. That takes > 13Gb of disk space. On that amount 'vacuum analyze' (every night) is > inefficient, cause after it the table continues to grow (but not > very fast). > > When trying to do 'vacuum full' it takes too long- I can wait only > 5-6 hours (and that is not enough), cause it locks the table and > the number of procecces, awaiting their inserts becomes too high. > So it is much faster (40-50 mins) to dump the entire database, > then drop it, recreate and resore it. > > I know that 'vacuum_mem = 65536' is not enough to do 'vacuum full' > fast enough - but I wanna ask- if I dedcide to increase that number > - will be 512 megs for example be better ? > > Is there any other init parameters that can helkp me ? > > Or speaking of such amount of data dump/recreate/restore will be the > best way ? > > WBR, Eugene. > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html --------------9AECE8AE5D08F104185BF524 Content-Type: text/x-vcard; charset=us-ascii; name="THIERRY.MISSIMILLY.vcf" Content-Description: Card for Thierry Missimilly Content-Disposition: attachment; filename="THIERRY.MISSIMILLY.vcf" Content-Transfer-Encoding: 7bit begin:vcard n:Missimilly;Thierry tel;fax:+33 (0)4 76 29 78 78 tel;work:+33 (0)4 76 29 74 54 x-mozilla-html:FALSE url:http:\\www.bull.com org:BIS/R&D adr:;;Bull SA, 1, rue de provence - BP 208;ECHIROLLES;;38432;FRANCE version:2.1 email;internet:Thierry.Missimilly@bull.net x-mozilla-cpt:;-18184 fn:Thierry Missimilly end:vcard --------------9AECE8AE5D08F104185BF524--