[imp] Postgres vacuuming

Adam Tauno Williams adam@morrison-ind.com
Thu, 21 Dec 2000 08:53:17 -0500 (EST)


>> Realized that we hadn't run VACUUM or VACUUM ANALYZE, *ever*.
>> Ran VACUUM, which took ten minutes (!).
>> Now, "SELECT count(*) FROM active_sessions" takes under a second, and
>> IMP isn't running slowly.> 
>What is VACUUM?  Is it pg specific?

Yes,  it the equivalent command to "update statistics" used by *real* databases
like oracle and informix.  Every database i've ever met has something like this,
even old dbase had "pack".  "vacuum analyze" in recent version of PosteSQL also
makes sure the assumptions used by the query analyzer are current and is what
you should use with >7.x.  It's best to try and do this when the DB isn't very
busy,  and you should ALWAYS do it after deleteing or loading large numbers of
records.

Systems and Network Administrator
Morrison Industries
1825 Monroe Ave NW.
Grand Rapids, MI. 49505