From: Aldor <an@mediaroot.de>
To: Ilya A. Kovalenko <shadow@oganer.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: VACUUM FULL vs dump & restore
Date: Sat, 24 Sep 2005 12:19:48 +0100
Message-ID: <43353654.5040600@mediaroot.de> (raw)
In-Reply-To: <1981474048079.20050924125612@oganer.net>
References: <1981474048079.20050924125612@oganer.net>
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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: an@mediaroot.de, shadow@oganer.net
Subject: Re: VACUUM FULL vs dump & restore
In-Reply-To: <43353654.5040600@mediaroot.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox