Re: replacements for vacuum?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: replacements for vacuum?
Date: 2004-12-18 07:25:43
Message-ID: 87k6rggj9k.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Lonni J Friedman <netllama(at)gmail(dot)com> writes:
>
> > I'd like to be able to run vacuum in a 'test' or read-only mode where
> > i'd see what it would do before actually running it.
>
> Er ... what possible value would that have? ISTM it would expend 80% of
> the effort to achieve 0% of the result.

Just a guess, maybe you mean "analyze" when you say "vacuum"? People often
conflate them since they often run both together with "vacuum analyze". But
there wouldn't be much point in running a test vacuum, they're might be some
point in running a test analyze.

If so, one little known feature: you can run analyze inside a transaction. The
new statistics are only used by that session until you commit. I started a
script to explain a set of queries, run analyze, then re-explain the queries
and compare the plans before either committing or rolling back. I think it
would be a useful DBA tool for a high availability production system, but I
haven't finished it.

--
greg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2004-12-18 08:27:15 Re: Multi row sequence?
Previous Message Greg Stark 2004-12-18 07:20:41 Re: Scheduler in Postgres