"Jonathan Gardner" <jgardner@jonathangardner.net> wrote:
> This is also a cheap way to "vacuum" the database:
>
> # pg_dump <dbname> | gzip > dump.gz
> # dropdb <dbname>
> # createdb <dbname>
> # gunzip -c dump.gz > psql <dbname>
Yes specially when you have a dump of about 1 GB and
you manage a service 24/24 7/7!!
The only cheap way to vacuum is:
#vacuumdb <dbname>
if you want update the statistics too:
#vacuumdb -z <dbname>
and if you can handle to have an exclusive lock on tables:
#vacuumdb -f -z <dbname>
the only think that I suggest for bigs table with index is
to reindex that table:
#psql -t -c "reindex table <table_name>" <dbname>
Regards
Gaetano Mendola