Re: VACUUM vs VACUUM ANALYZE - Mailing list pgsql-general

From Tom Lane
Subject Re: VACUUM vs VACUUM ANALYZE
Date
Msg-id 9081.1003455271@sss.pgh.pa.us
Whole thread Raw
In response to VACUUM vs VACUUM ANALYZE  ("Mark Coffman" <mark@epilogue.net>)
List pgsql-general
"Mark Coffman" <mark@epilogue.net> writes:
> I do a

> VACUUM
> VACUUM ANALYZE

> every hour... it takes about 3 minutes to run both.  Should I run ANALYZE
> less often?

VACUUM ANALYZE is a superset of VACUUM; there's certainly no reason to
do both one after the other.

As to whether you should do plain VACUUM some hours and VACUUM ANALYZE
others, that depends --- how fast are the statistics of your data
changing?  If the stats (such as column minimum and maximum values) are
relatively stable, you could get away with fewer ANALYZEs.  Maybe do one
ANALYZE every night at an off-peak time, and just plain VACUUM the rest
of the day.

            regards, tom lane

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: To Postgres Devs : Wouldn't changing the select limit
Next
From: "Brett W. McCoy"
Date:
Subject: Re: Possible bug in postgresql-7.1.3-1PGDG