[imp] Postgres vacuuming

Rich Lafferty rich@alcor.concordia.ca
Wed, 20 Dec 2000 23:27:50 -0500


ely intOn Wed, Dec 20, 2000 at 10:55:42PM -0500, jlewis@lewis.org (jlewis@lewis.org) wrote:
> On Wed, 20 Dec 2000, Rich Lafferty wrote:
> 
> > 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?

I believe so; most RDBMSes have *something* similar, although I'm not
sure if that's one of the areas in which MySQL is Just Different. It
rebuilds indexes and generates statistics used by the query optimizer.

> I really doubt we have 3802 users actively using IMP right now.  Isn't
> there a garbage collection routine that's supposed to be killing old
> sessions?

Yes, there is; but having 3802 open doesn't mean they're not being
GC'd, depending on how busy your machine is. Take a look at the
'changed' field; there's a datestamp in there. Right at this moment,
the oldest one on our system is 32 hours old.

  -Rich

-- 
------------------------------ Rich Lafferty ---------------------------
 Sysadmin/Programmer, Instructional and Information Technology Services
   Concordia University, Montreal, QC                 (514) 848-7625
------------------------- rich@alcor.concordia.ca ----------------------