VACUUM ANALYZE -vs- ANALYZE on an insert-only table. - Mailing list pgsql-general

From Matt Gordon
Subject VACUUM ANALYZE -vs- ANALYZE on an insert-only table.
Date
Msg-id 47BC08C8E02BA54EBD901AB9328BFBC08BFCD4@exchtwo
Whole thread Raw
Responses Re: VACUUM ANALYZE -vs- ANALYZE on an insert-only table.  (Bruno Wolff III <bruno@wolff.to>)
Re: VACUUM ANALYZE -vs- ANALYZE on an insert-only table.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
If I have a table that I only use for INSERTs and queries (no UPDATEs or DELETEs), is it enough to just run ANALYZE on
thetable instead of VACUUM ANALYZE?  In other words, is running a VACUUM on a table useful if all that you're doing is
INSERTinginto it?  My understanding of VACUUM is that it cleans up stale tuples that are left after UPDATEs and
DELETEs.

The reason that I'm asking this has mainly to do with performance.  I've got a lot of large tables (> 1 million
records)in my database.  Running a nightly VACUUM ANALYZE takes a while (> 1 hour) to run.  I'm wondering, given the
conditionabove, if I can skip the VACUUM part for these large tables and just run ANALYZE. 

If it matters, we're currently using Postgres 7.2.1.

-Matt.

pgsql-general by date:

Previous
From: "Netto"
Date:
Subject: Is it not datestyle that determines date format output?
Next
From: Patrick Higgins
Date:
Subject: PL/PgSQL composite parameter usage?