Re: VACUUM vs VACUUM ANALYZE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mark Coffman" <mark(at)epilogue(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: VACUUM vs VACUUM ANALYZE
Date: 2001-10-19 01:34:31
Message-ID: 9081.1003455271@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Mark Coffman" <mark(at)epilogue(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gary Huntress 2001-10-19 01:53:31 phpPgAdmin 2.3 build broken?
Previous Message Tom Lane 2001-10-19 01:26:38 Re: Possible bug in postgresql-7.1.3-1PGDG

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-10-19 03:13:17 Re: date/time improvements for 7.2
Previous Message Tom Lane 2001-10-19 01:30:56 Re: When will vacuum go away?