Thread: Is VACUUM ANALYZE a superset of VACUUM?

Is VACUUM ANALYZE a superset of VACUUM?

From
Forest Wilkinson
Date:
Does running "VACUUM ANALYZE" incorporate the effects of a plain old
"VACUUM"?  Or, must I run both "VACUUM" and "VACUUM ANALYZE" to have old
rows removed *and* statistics gathered?  The docs aren't clear about this.

Regards,

Forest


Re: Is VACUUM ANALYZE a superset of VACUUM?

From
Dustin Sallings
Date:
On Fri, 13 Oct 2000, Forest Wilkinson wrote:

# Does running "VACUUM ANALYZE" incorporate the effects of a plain old
# "VACUUM"?  Or, must I run both "VACUUM" and "VACUUM ANALYZE" to have old
# rows removed *and* statistics gathered?  The docs aren't clear about
# this.

    I'm quite sure ``vacuum analyze'' does both.  Is there a reason
there's no ``analyze?''  I guess it doesn't make too much of a difference
without time travel.

--
SA, beyond.com           My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________


Re: Is VACUUM ANALYZE a superset of VACUUM?

From
Tom Lane
Date:
Dustin Sallings <dustin@spy.net> writes:
>     I'm quite sure ``vacuum analyze'' does both.

Correct.

> Is there a reason there's no ``analyze?''

Historical, mostly.  No essential reason I can think of.  In current
sources the "analyze" part is run as a separate read-only transaction
after the data-compaction "vacuum" part, so they're at arm's length
already.  But no one's got round to building a separate statement.

            regards, tom lane