X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6C0A1D8F15 for ; Sat, 24 Sep 2005 08:19:47 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93718-06 for ; Sat, 24 Sep 2005 11:19:43 +0000 (GMT) Received: from 217-20-115-93.internetserviceteam.com (217-20-115-93.internetserviceteam.com [217.20.115.93]) by svr1.postgresql.org (Postfix) with ESMTP id 4011ED8EA4 for ; Sat, 24 Sep 2005 08:19:44 -0300 (ADT) Received: from [192.168.1.48] (103.Red-81-44-2.dynamicIP.rima-tde.net [81.44.2.103]) by 217-20-115-93.internetserviceteam.com (Postfix) with ESMTP id 54ED739AA5; Sat, 24 Sep 2005 12:35:46 +0200 (CEST) Message-ID: <43353654.5040600@mediaroot.de> Date: Sat, 24 Sep 2005 12:19:48 +0100 From: Aldor User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Ilya A. Kovalenko" Cc: pgsql-sql@postgresql.org Subject: Re: VACUUM FULL vs dump & restore References: <1981474048079.20050924125612@oganer.net> In-Reply-To: <1981474048079.20050924125612@oganer.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200509/241 X-Sequence-Number: 22788 Hello Ilya, you have to check for yourself which method is faster - just test it with a stopwatch;-) You have to take care, because when you make VACUUM FULL, then it vacuums also the system tables, etc. of postgres. I'm not sure if this is the same way VACUUM goes through all objects, but I'd make a customized vacuum, which finds out first every object which should be vacuumed by: select relname from pg_class You can filter out not wanted objects through the query or when processing the "VACUUM FULL [object]" or only "VACUUM [object]. In this way I can decide for myself what I want to vacuum, and what I will do by dump-truncate-restore. In many cases a normal VACUUM was even faster then the primitive dump-truncate-restore process. The bottlneck on a VACUUM is as I saw from my experience on tables with long strings inside and an amount of hundreds of millions. Regards, Aldor Ilya A. Kovalenko wrote: > Greetings, > > What advantages I lose, when using dump-truncate-restore (table > or whole DB) instead of performing VACUUM FULL ? > In both cases I have no access to data, but first is much faster > (by subjective estimate). > > Thank you, > > Ilya A. Kovalenko (mailto:shadow@oganer.net) > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org >