Is VACUUM ANALYZE a superset of VACUUM?

Started by Forest Wilkinsonover 25 years ago3 messagesgeneral
Jump to latest
#1Forest Wilkinson
fspam@home.com

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

#2Dustin Sallings
dustin@spy.net
In reply to: Forest Wilkinson (#1)
Re: Is VACUUM ANALYZE a superset of VACUUM?

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. ____________

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dustin Sallings (#2)
Re: Is VACUUM ANALYZE a superset of VACUUM?

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